mirror of
https://github.com/davidhalter/jedi.git
synced 2026-01-10 22:12:24 +08:00
Make sure inheritance works for fixtures, fixes #791
This commit is contained in:
@@ -15,3 +15,8 @@ def my_conftest_fixture(my_other_conftest_fixture):
|
||||
|
||||
def my_not_existing_fixture():
|
||||
return 3 # Just a normal function
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def inheritance_fixture():
|
||||
return ''
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user