[pypy-svn] pypy default: fix test runs directly addressing files in ctypes_tests

hpk42 commits-noreply at bitbucket.org
Sat Mar 12 19:40:29 CET 2011


Author: holger krekel <holger at merlinux.eu>
Branch: 
Changeset: r42529:76d5dc2b3501
Date: 2011-03-12 19:39 +0100
http://bitbucket.org/pypy/pypy/changeset/76d5dc2b3501/

Log:	fix test runs directly addressing files in ctypes_tests

diff --git a/pypy/module/test_lib_pypy/ctypes_tests/conftest.py b/pypy/module/test_lib_pypy/ctypes_tests/conftest.py
--- a/pypy/module/test_lib_pypy/ctypes_tests/conftest.py
+++ b/pypy/module/test_lib_pypy/ctypes_tests/conftest.py
@@ -1,4 +1,4 @@
-import py
+import py, pytest
 import sys
 
 def pytest_ignore_collect(path):
@@ -8,7 +8,7 @@
 def compile_so_file():
     from pypy.translator.platform import platform
     from pypy.translator.tool.cbuild import ExternalCompilationInfo
-    udir = py.test.ensuretemp('_ctypes_test')
+    udir = pytest.ensuretemp('_ctypes_test')
     cfile = py.path.local(__file__).dirpath().join("_ctypes_test.c")
 
     if sys.platform == 'win32':
@@ -20,6 +20,8 @@
     return platform.compile([cfile], eci, str(udir.join('_ctypes_test')),
                             standalone=False)
 
+# we need to run after the "tmpdir" plugin which installs pytest.ensuretemp
+ at pytest.mark.trylast
 def pytest_configure(config):
     global sofile
     sofile = compile_so_file()


More information about the Pypy-commit mailing list