2016-06-22 22:45:36 +08:00
|
|
|
def test_show_fixtures_and_test(testdir):
|
2016-06-25 18:21:31 +08:00
|
|
|
""" Verifies that fixtures are not executed. """
|
2018-05-23 22:48:46 +08:00
|
|
|
p = testdir.makepyfile(
|
|
|
|
"""
|
2016-06-22 22:45:36 +08:00
|
|
|
import pytest
|
|
|
|
@pytest.fixture
|
|
|
|
def arg():
|
|
|
|
assert False
|
|
|
|
def test_arg(arg):
|
|
|
|
assert False
|
2018-05-23 22:48:46 +08:00
|
|
|
"""
|
|
|
|
)
|
2016-06-22 22:45:36 +08:00
|
|
|
|
|
|
|
result = testdir.runpytest("--setup-plan", p)
|
|
|
|
assert result.ret == 0
|
|
|
|
|
2018-05-23 22:48:46 +08:00
|
|
|
result.stdout.fnmatch_lines(
|
|
|
|
["*SETUP F arg*", "*test_arg (fixtures used: arg)", "*TEARDOWN F arg*"]
|
|
|
|
)
|