Skip to content

Commit 749346d

Browse files
author
Sylvain MARIE
committed
Minor - now storing the config object first when hook is called
1 parent d424c19 commit 749346d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pytest_cases/plugin.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1410,15 +1410,16 @@ def pytest_addoption(parser):
14101410

14111411
# @hookspec(historic=True)
14121412
def pytest_configure(config):
1413+
# store the received config object for future use; see #165 & #166
14131414
global PYTEST_CONFIG
1415+
PYTEST_CONFIG = config
1416+
14141417
# validate the config
14151418
allowed_values = ('normal', 'skip')
14161419
reordering_choice = config.getoption(_OPTION_NAME)
14171420
if reordering_choice not in allowed_values:
14181421
raise ValueError("[pytest-cases] Wrong --%s option: %s. Allowed values: %s"
14191422
"" % (_OPTION_NAME, reordering_choice, allowed_values))
1420-
# store the received config object for future use; see #165 & #166
1421-
PYTEST_CONFIG = config
14221423

14231424

14241425
@pytest.hookimpl(tryfirst=True, hookwrapper=True)

0 commit comments

Comments
 (0)