File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -46,21 +46,28 @@ Use ``""`` instead of ``''`` in expression when running this on Windows
4646
4747**Run tests by node ids **
4848
49- Each collected test is assigned a unique ``nodeid `` which consist of the module filename followed
50- by specifiers like class names, function names and parameters from parametrization, separated by ``:: `` characters.
49+ Each collected test is assigned a unique ``nodeid `` which consist of the module file path followed
50+ by specifiers like class names and function names separated by ``:: `` characters,
51+ and parameters from parametrization in ``[...] ``.
52+ You can use the same syntax to match tests relative to the working directory.
5153
5254To run a specific test within a module:
5355
5456.. code-block :: bash
5557
56- pytest test_mod.py::test_func
58+ pytest tests/ test_mod.py::test_func
5759
60+ To run all tests in a class:
5861
59- Another example specifying a test method in the command line:
62+ .. code-block :: bash
63+
64+ pytest tests/test_mod.py::TestClass
65+
66+ Specifying a specific test method:
6067
6168.. code-block :: bash
6269
63- pytest test_mod.py::TestClass::test_method
70+ pytest tests/ test_mod.py::TestClass::test_method
6471
6572 **Run tests by marker expressions **
6673
You can’t perform that action at this time.
0 commit comments