Fix pytest --generate --fixtures flag

This patch resolves the issues where pytest will try to double load the
pytest_cmd_main.
This commit is contained in:
James Harris 2019-08-23 10:48:40 -05:00 committed by Alessio Bogon
parent 386ed90cec
commit b95e8e35c3
2 changed files with 4 additions and 1 deletions

View File

@ -81,7 +81,7 @@ def pytest_bdd_after_step(request, feature, scenario, step, step_func, step_func
def pytest_cmdline_main(config):
generation.cmdline_main(config)
return generation.cmdline_main(config)
def pytest_bdd_apply_tag(tag, function):

View File

@ -56,3 +56,6 @@ def test_generate_missing(testdir):
)
result.stdout.fnmatch_lines(["Please place the code above to the test file(s):"])
assert not result.stderr.str()
assert result.ret == 0