Почему все фикстуры в pytest глобальные?
Например:
tests/
conftest.py
# content of tests/conftest.py
import pytest
@pytest.fixture
def fixture_1():
pass
test_something.py
# content of tests/test_something.py
def test_something(fixture_2):
assert fixture_2 != None
subfolder/
conftest.py
# content of tests/subfolder/conftest.py
import pytest
@pytest.fixture
def fixture_2(username):
pass
Как вы можете видеть, я могу получить fixture_2 со второго уровня в тесте из папки первого уровня.
Есть ли возможность установить приспособление только на одну упаковку?