Author: mattip <[email protected]>
Branch: 
Changeset: r63269:e8279f674c46
Date: 2013-04-11 23:47 +0300
http://bitbucket.org/pypy/pypy/changeset/e8279f674c46/

Log:    skip crashing test on windows

diff --git a/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py 
b/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py
--- a/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py
+++ b/rpython/rtyper/lltypesystem/test/test_ll2ctypes.py
@@ -742,13 +742,17 @@
         assert not ALLOCATED     # detects memory leaks in the test
 
     def test_get_errno(self):
-        # win64: works with python 2.6.7, but not with 2.7.2
-        # XXX check what is different with ctypes!
         eci = ExternalCompilationInfo(includes=['string.h'])
         if sys.platform.startswith('win'):
             underscore_on_windows = '_'
-            if sys.version.startswith('2.7.2 '):
-                py.test.skip('ctypes is buggy. errno crashes with win64 and 
python 2.7.2')
+            # the default when writing to a invalid fd on windows is to call
+            # an _invalid_parameter_handler, which by default crashes the
+            # process. To fix this test, call _set_invalid_parameter_handler
+            # in the setup_method, and remove it in the teardown. 
+            # Note that cpython before 2.7 did install an 
_invalid_parameter_handler,
+            # which is why the test passes there, but this is no longer
+            # accepted practice.
+            py.test.skip('need to set an _invalid_parameter_handler')
         else:
             underscore_on_windows = ''
         strlen = rffi.llexternal('strlen', [rffi.CCHARP], rffi.SIZE_T,
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to