File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,11 @@ which also serve as documentation.
2929Raising errors on unknown marks: --strict
3030-----------------------------------------
3131
32- When the ``--strict `` command-line flag is passed, any marks not registered in the ``pytest.ini `` file will trigger an error.
32+ When the ``--strict `` command-line flag is passed, any unknown marks applied
33+ with the ``@pytest.mark.name_of_the_mark `` decorator will trigger an error.
34+ Marks defined or added by pytest or by a plugin will not trigger an error.
3335
34- Marks can be registered like this:
36+ Marks can be registered in `` pytest.ini `` like this:
3537
3638.. code-block :: ini
3739
Original file line number Diff line number Diff line change @@ -1226,8 +1226,11 @@ passed multiple times. The expected format is ``name=value``. For example::
12261226
12271227.. confval :: markers
12281228
1229- List of markers that are allowed in test functions, enforced when ``--strict `` command-line argument is used.
1230- You can use a marker name per line, indented from the option name.
1229+ When the ``--strict `` command-line argument is used, only known markers -
1230+ defined in code by core pytest or some plugin - are allowed.
1231+ You can list additional markers in this setting to add them to the whitelist.
1232+
1233+ You can list one marker name per line, indented from the option name.
12311234
12321235 .. code-block :: ini
12331236
You can’t perform that action at this time.
0 commit comments