Skip to content

Commit ab5bec0

Browse files
committed
Mention the correct --strict-markers flag, now that --strict was removed from pytest 8
1 parent 3402450 commit ab5bec0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ scenario test, so we can use standard test selection:
760760
pytest -m "backend and login and successful"
761761
762762
The feature and scenario markers are not different from standard pytest markers, and the ``@`` symbol is stripped out automatically to allow test selector expressions. If you want to have bdd-related tags to be distinguishable from the other test markers, use a prefix like ``bdd``.
763-
Note that if you use pytest with the ``--strict`` option, all bdd tags mentioned in the feature files should be also in the ``markers`` setting of the ``pytest.ini`` config. Also for tags please use names which are python-compatible variable names, i.e. start with a non-number, only underscores or alphanumeric characters, etc. That way you can safely use tags for tests filtering.
763+
Note that if you use pytest with the ``--strict-markers`` option, all Gherkin tags mentioned in the feature files should be also in the ``markers`` setting of the ``pytest.ini`` config. Also for tags please use names which are python-compatible variable names, i.e. start with a non-number, only underscores or alphanumeric characters, etc. That way you can safely use tags for tests filtering.
764764

765765
You can customize how tags are converted to pytest marks by implementing the
766766
``pytest_bdd_apply_tag`` hook and returning ``True`` from it:

0 commit comments

Comments
 (0)