alias function keywords to funcarg request keywords
--HG-- branch : trunk
This commit is contained in:
parent
976549cc88
commit
2a579217b8
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in New Issue