changeset 4942:dce251f8cfc3

support py.test 1.0 funcargs (thanks to Holger Krekel for the patch)
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sun, 09 Aug 2009 01:30:45 +0200
parents 3e7e3a01a833
children 068c47fc2c3a 5812d5394811
files MoinMoin/conftest.py
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/conftest.py	Sun Aug 09 01:24:15 2009 +0200
+++ b/MoinMoin/conftest.py	Sun Aug 09 01:30:45 2009 +0200
@@ -77,6 +77,13 @@
 
 # py.test customization starts here
 
+# py.test-1.0 provides "funcargs" natively
+def pytest_funcarg__request(request):
+    # note the naminng clash: py.test's funcarg-request object
+    # and the request we provide are totally separate things
+    cls = request._pyfuncitem.getparent(py.test.collect.Module)
+    return cls.request
+
 class MoinTestFunction(py.test.collect.Function):
     def execute(self, target, *args):
         request = self.parent.request