Author: Ronan Lamy <ronan.l...@gmail.com>
Branch: cleanup-test_lib_pypy
Changeset: r95465:261405fad710
Date: 2018-12-12 21:20 +0000
http://bitbucket.org/pypy/pypy/changeset/261405fad710/

Log:    Compatibility with pytest 4.*

diff --git a/extra_tests/ctypes_tests/conftest.py 
b/extra_tests/ctypes_tests/conftest.py
--- a/extra_tests/ctypes_tests/conftest.py
+++ b/extra_tests/ctypes_tests/conftest.py
@@ -85,8 +85,7 @@
     return outputfilename
 # end copy
 
-def compile_so_file():
-    udir = pytest.ensuretemp('_ctypes_test')
+def compile_so_file(udir):
     cfile = py.path.local(__file__).dirpath().join("_ctypes_test.c")
 
     if sys.platform == 'win32':
@@ -97,8 +96,9 @@
     return c_compile([cfile], str(udir / '_ctypes_test'), libraries=libraries)
 
 @pytest.fixture(scope='session')
-def sofile():
-    return str(compile_so_file())
+def sofile(tmpdir_factory):
+    udir = tmpdir_factory.mktemp('_ctypes_test')
+    return str(compile_so_file(udir))
 
 @pytest.fixture
 def dll(sofile):
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to