From 455d79e68011035d4786b1e8ff8d5685cee0353d Mon Sep 17 00:00:00 2001 From: SauravMaheshkar Date: Mon, 27 Dec 2021 20:39:34 +0530 Subject: [PATCH] Add a note in the usage docs about quotes --- doc/en/how-to/usage.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/en/how-to/usage.rst b/doc/en/how-to/usage.rst index 3522b258d..f094c2560 100644 --- a/doc/en/how-to/usage.rst +++ b/doc/en/how-to/usage.rst @@ -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: