Implement --setup-plan option
This commit is contained in:
18
testing/python/setup_plan.py
Normal file
18
testing/python/setup_plan.py
Normal file
@@ -0,0 +1,18 @@
|
||||
def test_show_fixtures_and_test(testdir):
|
||||
p = testdir.makepyfile('''
|
||||
import pytest
|
||||
@pytest.fixture
|
||||
def arg():
|
||||
assert False
|
||||
def test_arg(arg):
|
||||
assert False
|
||||
''')
|
||||
|
||||
result = testdir.runpytest("--setup-plan", p)
|
||||
assert result.ret == 0
|
||||
|
||||
result.stdout.fnmatch_lines([
|
||||
'*SETUP F arg*',
|
||||
'*test_arg (fixtures used: arg)',
|
||||
'*TEARDOWN F arg*',
|
||||
])
|
||||
Reference in New Issue
Block a user