[pypy-svn] r54035 - pypy/dist/pypy/lib/app_test
arigo at codespeak.net
arigo at codespeak.net
Wed Apr 23 11:38:36 CEST 2008
Author: arigo
Date: Wed Apr 23 11:38:35 2008
New Revision: 54035
Modified:
pypy/dist/pypy/lib/app_test/test_ctypes_support.py
Log:
Fix this test to run on top of CPython too
(i.e. when run simply with 'py.test test_ctypes_support.py').
Modified: pypy/dist/pypy/lib/app_test/test_ctypes_support.py
==============================================================================
--- pypy/dist/pypy/lib/app_test/test_ctypes_support.py (original)
+++ pypy/dist/pypy/lib/app_test/test_ctypes_support.py Wed Apr 23 11:38:35 2008
@@ -1,6 +1,10 @@
from ctypes import *
-from ctypes_support import standard_c_lib, get_errno, set_errno
+try:
+ from ctypes_support import standard_c_lib, get_errno, set_errno
+except ImportError: # on top of cpython
+ from pypy.lib.ctypes_support import standard_c_lib, get_errno, set_errno
+
def test_stdlib_and_errno():
write = standard_c_lib.write
More information about the Pypy-commit
mailing list