-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Open
Labels
topic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytype: bugproblem that needs to be addressedproblem that needs to be addressed
Description
Best explained with a failing test, see:
or inline for the lazy:
import pytest
@pytest.fixture(scope='session')
def foo():
return 'foo'
@pytest.fixture(scope='session')
def bar(foo):
return foo + 'bar'
@pytest.fixture(scope='session')
def baz(bar):
return bar + 'baz'
class TestSpecific:
@pytest.fixture(scope='session')
def foo(self):
return 'FOO'
@pytest.fixture(scope='session')
def baz(self, bar):
return bar + 'BAZ'
def test_b(self, foo, bar, baz):
pass
def test_c(foo, bar, baz):
assert foo == 'foo'
assert bar == 'foobar'
assert baz == 'foobarbaz'Fails with the current master.
Metadata
Metadata
Assignees
Labels
topic: fixturesanything involving fixtures directly or indirectlyanything involving fixtures directly or indirectlytype: bugproblem that needs to be addressedproblem that needs to be addressed