Skip to content

Commit e622975

Browse files
committed
Merge pull request #987 from benauthor/master
Document single-method usage
2 parents 8625eb6 + 6ffb659 commit e622975

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

doc/en/usage.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ Several test run options::
4646
py.test test_mod.py # run tests in module
4747
py.test somepath # run all tests below somepath
4848
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"
5050
# will select TestMyClass.test_something
5151
# but not TestMyClass.test_method_simple
5252
py.test test_mod.py::test_func # only run tests that match the "node ID",
5353
# e.g "test_mod.py::test_func" will select
5454
# 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
5557

5658
Import 'pkg' and use its filesystem location to find and run tests::
5759

@@ -87,7 +89,7 @@ failure situation::
8789
py.test -x --pdb # drop to PDB on first failure, then end test session
8890
py.test --pdb --maxfail=3 # drop to PDB for first three failures
8991

90-
Note that on any failure the exception information is stored on
92+
Note that on any failure the exception information is stored on
9193
``sys.last_value``, ``sys.last_type`` and ``sys.last_traceback``. In
9294
interactive use, this allows one to drop into postmortem debugging with
9395
any debug tool. One can also manually access the exception information,
@@ -260,6 +262,6 @@ hook was invoked::
260262

261263
$ python myinvoke.py
262264
*** test run reporting finishing
263-
265+
264266

265267
.. include:: links.inc

0 commit comments

Comments
 (0)