Make sure inheritance works for fixtures, fixes #791

This commit is contained in:
Dave Halter
2020-01-05 19:13:56 +01:00
parent 5da9f9facd
commit 4243d01560
3 changed files with 62 additions and 11 deletions

View File

@@ -137,3 +137,33 @@ def test_p(capsysbin
#? ['tmpdir', 'tmpdir_factory']
def test_p(tmpdi
def close_parens():
pass
# -----------------
# inheritance
# -----------------
@fixture
#? 40 ['inheritance_fixture']
def inheritance_fixture(inheritance_fixture):
#? str()
inheritance_fixture
#? ['upper']
inheritance_fixture.upper
return 1
#! 48 ['def inheritance_fixture']
def test_inheritance_fixture(inheritance_fixture, caplog):
#? int()
inheritance_fixture
#? ['set_level']
caplog.set_le
@pytest.fixture
def caplog(caplog):
yield caplog