From a69c9574686abf04bb4090c92babc33867b667de Mon Sep 17 00:00:00 2001 From: Ran Benita Date: Fri, 28 Jul 2023 09:45:37 +0300 Subject: [PATCH] Update usage.rst --- doc/en/how-to/usage.rst | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/en/how-to/usage.rst b/doc/en/how-to/usage.rst index 9f996a9e3..8cab6882c 100644 --- a/doc/en/how-to/usage.rst +++ b/doc/en/how-to/usage.rst @@ -46,8 +46,8 @@ Use ``""`` instead of ``''`` in expression when running this on Windows **Run tests by collection argument** -Pass the module filename relative to working directory followed by specifiers like class names, function names and -parameters from parameterization, separated by ``::`` characters. +Pass the module filename relative to the working directory, followed by specifiers like the class name and function name +separated by ``::`` characters, and parameters from parameterization enclosed in ``[]``. To run a specific test within a module: @@ -67,6 +67,12 @@ Specifying a specific test method: pytest tests/test_mod.py::TestClass::test_method +Specifying a specific parametrization of a test: + +.. code-block:: bash + + pytest tests/test_mod.py::test_func[x1,y2] + **Run tests by marker expressions** .. code-block:: bash