From d25580676ee31c285aba2f3d74739f634e4e864b Mon Sep 17 00:00:00 2001 From: Tom Lee Date: Mon, 8 May 2023 20:54:52 -0700 Subject: [PATCH] Update usage.rst A note is added for that single quotation is used in Windows. --- doc/en/how-to/usage.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/en/how-to/usage.rst b/doc/en/how-to/usage.rst index c56bef4a6..7dd3f9dc5 100644 --- a/doc/en/how-to/usage.rst +++ b/doc/en/how-to/usage.rst @@ -35,11 +35,12 @@ 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``. +Use ``"`` instead of ``''`` in expression when running this on Windows .. _nodeids: