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
46
46
47
47
**Run tests by node ids **
48
48
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.
51
53
52
54
To run a specific test within a module:
53
55
54
56
.. code-block :: bash
55
57
56
- pytest test_mod.py::test_func
58
+ pytest tests/ test_mod.py::test_func
57
59
60
+ To run all tests in a class:
58
61
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:
60
67
61
68
.. code-block :: bash
62
69
63
- pytest test_mod.py::TestClass::test_method
70
+ pytest tests/ test_mod.py::TestClass::test_method
64
71
65
72
**Run tests by marker expressions **
66
73
You can’t perform that action at this time.
0 commit comments