alias function keywords to funcarg request keywords

--HG--
branch : trunk
This commit is contained in:
Ronny Pfannschmidt 2010-10-16 02:00:05 +02:00
parent 976549cc88
commit 2a579217b8
2 changed files with 2 additions and 0 deletions

View File

@ -536,6 +536,7 @@ class FuncargRequest:
def __init__(self, pyfuncitem):
self._pyfuncitem = pyfuncitem
self.function = pyfuncitem.obj
self.keywords = pyfuncitem.keywords
self.module = pyfuncitem.getparent(pytest.collect.Module).obj
clscol = pyfuncitem.getparent(pytest.collect.Class)
self.cls = clscol and clscol.obj or None

View File

@ -562,6 +562,7 @@ class TestRequest:
""")
req = funcargs.FuncargRequest(item)
assert req.function == item.obj
assert req.keywords is item.keywords
assert hasattr(req.module, 'test_func')
assert req.cls is None
assert req.function.__name__ == "test_func"