[pypy-svn] pypy commit a1d660058003: I don't 100% understand what's going on. It seems that if you have a
Bitbucket
commits-noreply at bitbucket.org
Tue Dec 14 10:23:56 CET 2010
# HG changeset patch -- Bitbucket.org
# Project pypy
# URL http://bitbucket.org/pypy/pypy/overview
# User Antonio Cuni <anto.cuni at gmail.com>
# Date 1292318594 -3600
# Node ID a1d660058003b0c82e864c81be80b8093855cfc0
# Parent e5b73981fc8d5cd14074426b0e439f0716379a31
I don't 100% understand what's going on. It seems that if you have a
conftest.py in the test/ directory, py.test won't call the
pytest_collect_directory hook. However, if will call it if it is in the parent
directory.
Before, everything worked because we had a .svn dir everywhere, so the
conftest was in the parent dir of the .svn (!!!).
Fix it by moving the conftests one level up.
--- /dev/null
+++ b/pypy/module/test_lib_pypy/conftest.py
@@ -0,0 +1,25 @@
+import py
+import sys
+
+def pytest_collect_directory():
+ if '__pypy__' not in sys.builtin_module_names:
+ py.test.skip("these tests are meant to be run on top of pypy-c")
+
+def compile_so_file():
+ from pypy.translator.platform import platform
+ from pypy.translator.tool.cbuild import ExternalCompilationInfo
+ udir = py.test.ensuretemp('_ctypes_test')
+ cfile = py.path.local(__file__).dirpath().join("ctypes_tests", "_ctypes_test.c")
+
+ if sys.platform == 'win32':
+ libraries = ['oleaut32']
+ else:
+ libraries = []
+ eci = ExternalCompilationInfo(libraries=libraries)
+
+ return platform.compile([cfile], eci, str(udir.join('_ctypes_test')),
+ standalone=False)
+
+def pytest_configure(config):
+ global sofile
+ sofile = compile_so_file()
--- /dev/null
+++ b/pypy/rlib/rsdl/conftest.py
@@ -0,0 +1,8 @@
+from pypy.rlib.rsdl.eci import check_sdl_installation, SDLNotInstalled
+import py
+
+def pytest_collect_directory():
+ try:
+ check_sdl_installation()
+ except SDLNotInstalled, e:
+ py.test.skip("SDL not installed(?): %s" % (e,))
--- a/pypy/module/test_lib_pypy/ctypes_tests/conftest.py
+++ /dev/null
@@ -1,25 +0,0 @@
-import py
-import sys
-
-def pytest_collect_directory():
- if '__pypy__' not in sys.builtin_module_names:
- py.test.skip("these tests are meant to be run on top of pypy-c")
-
-def compile_so_file():
- from pypy.translator.platform import platform
- from pypy.translator.tool.cbuild import ExternalCompilationInfo
- udir = py.test.ensuretemp('_ctypes_test')
- cfile = py.path.local(__file__).dirpath().join("_ctypes_test.c")
-
- if sys.platform == 'win32':
- libraries = ['oleaut32']
- else:
- libraries = []
- eci = ExternalCompilationInfo(libraries=libraries)
-
- return platform.compile([cfile], eci, str(udir.join('_ctypes_test')),
- standalone=False)
-
-def pytest_configure(config):
- global sofile
- sofile = compile_so_file()
--- a/pypy/jit/backend/llvm/test/conftest.py
+++ /dev/null
@@ -1,4 +0,0 @@
-import py
-
-def pytest_collect_directory():
- py.test.skip("llvm backend tests skipped for now")
--- a/pypy/rlib/rsdl/test/conftest.py
+++ /dev/null
@@ -1,8 +0,0 @@
-from pypy.rlib.rsdl.eci import check_sdl_installation, SDLNotInstalled
-import py
-
-def pytest_collect_directory():
- try:
- check_sdl_installation()
- except SDLNotInstalled, e:
- py.test.skip("SDL not installed(?): %s" % (e,))
--- /dev/null
+++ b/pypy/jit/backend/llvm/conftest.py
@@ -0,0 +1,4 @@
+import py
+
+def pytest_collect_directory():
+ py.test.skip("llvm backend tests skipped for now")
More information about the Pypy-commit
mailing list