Refactor direct fixture call warning to avoid incompatibility with plugins
This refactors the code so we have the real function object right during collection. This avoids having to unwrap it later and lose attached information such as "async" functions. Fix #3747
This commit is contained in:
@@ -1470,10 +1470,9 @@ class TestFixtureManagerParseFactories(object):
|
||||
print (faclist)
|
||||
assert len(faclist) == 3
|
||||
|
||||
kwargs = {'__being_called_by_pytest': True}
|
||||
assert faclist[0].func(item._request, **kwargs) == "conftest"
|
||||
assert faclist[1].func(item._request, **kwargs) == "module"
|
||||
assert faclist[2].func(item._request, **kwargs) == "class"
|
||||
assert faclist[0].func(item._request) == "conftest"
|
||||
assert faclist[1].func(item._request) == "module"
|
||||
assert faclist[2].func(item._request) == "class"
|
||||
"""
|
||||
)
|
||||
reprec = testdir.inline_run("-s")
|
||||
|
||||
Reference in New Issue
Block a user