File tree Expand file tree Collapse file tree 3 files changed +20
-4
lines changed
tests/cases/issues/issue_196 Expand file tree Collapse file tree 3 files changed +20
-4
lines changed Original file line number Diff line number Diff line change @@ -1408,12 +1408,14 @@ def pytest_addoption(parser):
14081408PYTEST_CONFIG = None # type: _pytest.config.Config
14091409
14101410
1411- # @hookspec(historic=True)
1412- def pytest_configure (config ):
1413- # store the received config object for future use; see #165 & #166
1411+ def pytest_load_initial_conftests (early_config ):
1412+ # store the received config object for future use; see #165 #166 #196
14141413 global PYTEST_CONFIG
1415- PYTEST_CONFIG = config
1414+ PYTEST_CONFIG = early_config
1415+
14161416
1417+ # @hookspec(historic=True)
1418+ def pytest_configure (config ):
14171419 # validate the config
14181420 allowed_values = ('normal' , 'skip' )
14191421 reordering_choice = config .getoption (_OPTION_NAME )
Original file line number Diff line number Diff line change 1+ from pytest_cases import fixture , parametrize_with_cases
2+
3+
4+ def case_a ():
5+ return 1
6+
7+
8+ @fixture
9+ @parametrize_with_cases ("a" , cases = case_a )
10+ def dummy_fixture (a ):
11+ return a + 1
Original file line number Diff line number Diff line change 1+ def test_foo (dummy_fixture ):
2+ """Before the fix this test would not even start because a conftest loading error was appearing"""
3+ assert dummy_fixture == 2
You can’t perform that action at this time.
0 commit comments