[pypy-svn] r61690 - pypy/trunk/pypy/lib/app_test/ctypes_tests

afa at codespeak.net afa at codespeak.net
Tue Feb 10 14:19:23 CET 2009


Author: afa
Date: Tue Feb 10 14:19:22 2009
New Revision: 61690

Modified:
   pypy/trunk/pypy/lib/app_test/ctypes_tests/test_guess_argtypes.py
Log:
Fix this test. 
It segfaults on Linux, see http://bugs.python.org/issue5203
pypyp-c runs it with success :-)


Modified: pypy/trunk/pypy/lib/app_test/ctypes_tests/test_guess_argtypes.py
==============================================================================
--- pypy/trunk/pypy/lib/app_test/ctypes_tests/test_guess_argtypes.py	(original)
+++ pypy/trunk/pypy/lib/app_test/ctypes_tests/test_guess_argtypes.py	Tue Feb 10 14:19:22 2009
@@ -28,7 +28,10 @@
     assert guess([s]) == [c_void_p]
 
 def test_guess_unicode():
-    dll = ctypes.CDLL(str(conftest.sofile))
+    if not hasattr(sys, 'pypy_translation_info') and sys.platform != 'win32':
+        py.test.skip("CPython segfaults: see http://bugs.python.org/issue5203")
+    import conftest
+    dll = CDLL(str(conftest.sofile))
     wcslen = dll.my_wcslen
     text = u"Some long unicode string"
-    assert ctypes.cdll.msvcrt.wcslen(text) == len(text)
+    assert wcslen(text) == len(text)



More information about the Pypy-commit mailing list