Fix --setup-only and --setup-show for custom pytest items

Fix #5884
This commit is contained in:
Bruno Oliveira
2019-09-28 11:52:09 -03:00
parent 6bfd30d169
commit 7bdfba3578
5 changed files with 36 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
def test_show_fixtures_and_test(testdir):
def test_show_fixtures_and_test(testdir, dummy_yaml_custom_test):
""" Verifies that fixtures are not executed. """
p = testdir.makepyfile(
testdir.makepyfile(
"""
import pytest
@pytest.fixture
@@ -11,7 +11,7 @@ def test_show_fixtures_and_test(testdir):
"""
)
result = testdir.runpytest("--setup-plan", p)
result = testdir.runpytest("--setup-plan")
assert result.ret == 0
result.stdout.fnmatch_lines(