You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
@pytest.fixture(scope="package") works like session if placed in one file and used with pytest_plugins in conftest.py #7232
my fixtures are placed in separate folder 'fixtures'.
When I run some fixture, which is defined in fixtures.configuration with scope "package" it's executed as session fixture. So I suppose this package scope realted to where fixtures are placed, than to where they're called. Is it expected behavior? if I want to use pytest_plugins in conftest.py this looks a bit inconvenient.
This can be tested by.
Creating conftest.py in root of directory with content:
pytest_plugins = ['fixtures.myfixtures']
Creating fixtures folder with myfxitures.py file inside of it with content.
changed the title [-]@pytest.fixture(scope="package") works like session if placed in one conftest.py[/-][+]@pytest.fixture(scope="package") works like session if placed in one file and used with pytest_plugins in conftest.py[/+]on May 20, 2020
Activity
[-]@pytest.fixture(scope="package") works like session if placed in one conftest.py[/-][+]@pytest.fixture(scope="package") works like session if placed in one file and used with pytest_plugins in conftest.py[/+]net: Change bridge_nncp scope from package to module
azhivovk commentedon Jul 9, 2026
I've faced the same issue on pytest-9.1.1
net, stability: Change bridge_nncp scope from package to module (#5573)
net, stability: Change bridge_nncp scope from package to module (RedH…
net, stability: Change bridge_nncp scope from package to module (RedH…
net, stability: Change bridge_nncp scope from package to module (RedH…