Skip to content

Commit 6da203f

Browse files
author
Sylvain MARIE
committed
More readable error when config is not found
1 parent 749346d commit 6da203f

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

pytest_cases/common_pytest.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -591,6 +591,9 @@ def __init__(self, func):
591591
from .plugin import PYTEST_CONFIG # late import to ensure config has been loaded by now
592592

593593
self.config = PYTEST_CONFIG
594+
if self.config is None:
595+
raise ValueError("Internal error - config has not been correctly loaded. Please report")
596+
594597
self.function = func
595598
self.definition = MiniFuncDef(func.__name__)
596599
self._calls = []

0 commit comments

Comments
 (0)