[pypy-svn] pypy pytest2: substitute a non-portable conftest hack that pretended that lib_pypy's contents were also in pypy/module
hpk42
commits-noreply at bitbucket.org
Mon Mar 7 10:57:47 CET 2011
Author: holger krekel <holger at merlinux.eu>
Branch: pytest2
Changeset: r42454:ef3c80ea6e02
Date: 2011-03-07 10:56 +0100
http://bitbucket.org/pypy/pypy/changeset/ef3c80ea6e02/
Log: substitute a non-portable conftest hack that pretended that
lib_pypy's contents were also in pypy/module
diff --git a/lib_pypy/conftest.py b/lib_pypy/conftest.py
new file mode 100644
--- /dev/null
+++ b/lib_pypy/conftest.py
@@ -0,0 +1,2 @@
+
+from pypy.conftest import *
diff --git a/pypy/module/conftest.py b/pypy/module/conftest.py
deleted file mode 100644
--- a/pypy/module/conftest.py
+++ /dev/null
@@ -1,18 +0,0 @@
-import py
-from pypy.tool.lib_pypy import LIB_PYPY
-
-class MultipleDirCollector(py.test.collect.Collector):
- def __init__(self, name, mainfspath, fspaths, parent=None, config=None):
- super(MultipleDirCollector, self).__init__(name, parent, config)
- self.main_collector = py.test.collect.Directory(mainfspath, self)
- self.collectors = [py.test.collect.Directory(fspath, self)
- for fspath in fspaths]
-
- def collect(self):
- return self.main_collector.collect() + self.collectors
-
-
-def pytest_collect_directory(path, parent):
- if path.basename == 'test_lib_pypy':
- # collect all the test in BOTH test_lib_pypy and ../../lib_pypy
- return MultipleDirCollector(path.basename, path, [LIB_PYPY], parent)
More information about the Pypy-commit
mailing list