-
Notifications
You must be signed in to change notification settings - Fork 117
Description
The docs say:
-S, --setvar=[TEST.]VAR=VAL
Set variable VAR in all tests or optionally only in test TEST to VAL.
TEST can have the form [TEST.][FIXT.]*, in which case VAR will be set in fixture FIXT of TEST. Note that this syntax is recursive on fixtures, so that a variable can be set in a fixture arbitrarily deep. TEST prefix refers to the test class name, not the test name, but FIXT refers to the fixture name inside the referenced test.
As far as I can tell [TEST.][FIXT.]* is not correct. We can set a variable in all the non-fixture tests with -Svar=val but for fixtures we have to do it manually since FIXT is not the class name but the name inside a test. Also * doesn't work for me at all, not sure what a valid example would be.
I think we should extend -S and allow setting fixture variables more easily.
This is also slightly related to #2626 , since -S strict_check=1 is not really equivalent to --strict.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status