@@ -46,12 +46,14 @@ Several test run options::
46
46
py.test test_mod.py # run tests in module
47
47
py.test somepath # run all tests below somepath
48
48
py.test -k stringexpr # only run tests with names that match the
49
- # the "string expression", e.g. "MyClass and not method"
49
+ # the "string expression", e.g. "MyClass and not method"
50
50
# will select TestMyClass.test_something
51
51
# but not TestMyClass.test_method_simple
52
52
py.test test_mod.py::test_func # only run tests that match the "node ID",
53
53
# e.g "test_mod.py::test_func" will select
54
54
# only test_func in test_mod.py
55
+ py.test test_mod.py::TestClass::test_method # run a single method in
56
+ # a single class
55
57
56
58
Import 'pkg' and use its filesystem location to find and run tests::
57
59
@@ -87,7 +89,7 @@ failure situation::
87
89
py.test -x --pdb # drop to PDB on first failure, then end test session
88
90
py.test --pdb --maxfail=3 # drop to PDB for first three failures
89
91
90
- Note that on any failure the exception information is stored on
92
+ Note that on any failure the exception information is stored on
91
93
``sys.last_value ``, ``sys.last_type `` and ``sys.last_traceback ``. In
92
94
interactive use, this allows one to drop into postmortem debugging with
93
95
any debug tool. One can also manually access the exception information,
@@ -260,6 +262,6 @@ hook was invoked::
260
262
261
263
$ python myinvoke.py
262
264
*** test run reporting finishing
263
-
265
+
264
266
265
267
.. include :: links.inc
0 commit comments