[pypy-svn] r75528 - pypy/branch/sys-prefix/pypy/module
antocuni at codespeak.net
antocuni at codespeak.net
Wed Jun 23 16:31:08 CEST 2010
Author: antocuni
Date: Wed Jun 23 16:31:07 2010
New Revision: 75528
Added:
pypy/branch/sys-prefix/pypy/module/conftest.py (contents, props changed)
Log:
when running py.test pypy/module/test_lib_pypy, also collect the tests in lib_pypy
Added: pypy/branch/sys-prefix/pypy/module/conftest.py
==============================================================================
--- (empty file)
+++ pypy/branch/sys-prefix/pypy/module/conftest.py Wed Jun 23 16:31:07 2010
@@ -0,0 +1,17 @@
+import py
+from pypy.tool.lib_pypy import LIB_PYPY
+
+class MultipleDirCollector(py.test.collect.Collector):
+ def __init__(self, name, fspaths, parent=None, config=None):
+ super(MultipleDirCollector, self).__init__(name, parent, config)
+ self.collectors = [py.test.collect.Directory(fspath, self)
+ for fspath in fspaths]
+
+ def collect(self):
+ return 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