Add a note in the usage docs about quotes

This commit is contained in:
SauravMaheshkar 2021-12-27 20:39:34 +05:30
parent 1131f23e04
commit 455d79e680
1 changed files with 3 additions and 1 deletions

View File

@ -35,11 +35,13 @@ Pytest supports several ways to run and select tests from the command-line.
.. code-block:: bash
pytest -k "MyClass and not method"
pytest -k 'MyClass and not method'
This will run tests which contain names that match the given *string expression* (case-insensitive),
which can include Python operators that use filenames, class names and function names as variables.
The example above will run ``TestMyClass.test_something`` but not ``TestMyClass.test_method_simple``.
For the default windowns terminal ``cmd.exe`` you should use double quotes i.e. ``"``. For all other
shells ``'`` is preferred.
.. _nodeids: