[pypy-svn] r74682 - pypy/trunk/pypy/module/cpyext/test

hpk at codespeak.net hpk at codespeak.net
Sat May 22 18:20:40 CEST 2010


Author: hpk
Date: Sat May 22 18:20:39 2010
New Revision: 74682

Modified:
   pypy/trunk/pypy/module/cpyext/test/conftest.py
Log:
don't use deprecated "class Directory" 


Modified: pypy/trunk/pypy/module/cpyext/test/conftest.py
==============================================================================
--- pypy/trunk/pypy/module/cpyext/test/conftest.py	(original)
+++ pypy/trunk/pypy/module/cpyext/test/conftest.py	Sat May 22 18:20:39 2010
@@ -1,15 +1,12 @@
 import py
 from pypy.conftest import option, gettestobjspace
 
-class Directory(py.test.collect.Directory):
-    def collect(self):
-        if option.runappdirect:
-            py.test.skip("cannot be run by py.test -A")
+def pytest_collect_directory(parent):
+    if parent.config.option.runappdirect:
+        py.test.skip("cannot be run by py.test -A")
 
-        # ensure additional functions are registered
-        import pypy.module.cpyext.test.test_cpyext
-
-        return super(Directory, self).collect()
+    # ensure additional functions are registered
+    import pypy.module.cpyext.test.test_cpyext
 
 def pytest_funcarg__space(request):
     return gettestobjspace(usemodules=['cpyext', 'thread'])



More information about the Pypy-commit mailing list