Mercurial > moin > 1.9
changeset 4952:2117e64aea4e
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 | 315b15e9cd5e |
children | ca4d2f593508 |
files | MoinMoin/conftest.py |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/MoinMoin/conftest.py Sun Aug 16 00:39:26 2009 +0200 +++ b/MoinMoin/conftest.py Sun Aug 09 01:30:45 2009 +0200 @@ -81,6 +81,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