fix issue 179 - propperly show the dependency chain of factories on setup failure

This commit is contained in:
Ronny Pfannschmidt
2012-08-22 21:43:42 +02:00
parent 503addbf09
commit e876ad9abd
3 changed files with 15 additions and 5 deletions

View File

@@ -1664,8 +1664,7 @@ class TestFuncargFactory:
"*2 passed*"
])
@pytest.mark.xfail(reason="factorydef passed to tw.line")
def test_factory_uses_unknown_funcarg_error(self, testdir):
def test_factory_uses_unknown_funcarg_as_dependency_error(self, testdir):
testdir.makepyfile("""
import pytest
@@ -1682,7 +1681,10 @@ class TestFuncargFactory:
""")
result = testdir.runpytest()
result.stdout.fnmatch_lines([
"*LookupError: no factory found for argument 'missing'"
"*dependency of:*",
"*call_fail*",
"*def fail(*",
"*LookupError: no factory found for argument 'missing'",
])