[Python-checkins] devguide: say how to run one test (closes #21361)
benjamin.peterson
python-checkins at python.org
Sun Apr 27 16:44:54 CEST 2014
http://hg.python.org/devguide/rev/6b912c90de72
changeset: 690:6b912c90de72
user: Benjamin Peterson <benjamin at python.org>
date: Sun Apr 27 10:44:46 2014 -0400
summary:
say how to run one test (closes #21361)
Patch from Jessica McKellar.
files:
runtests.rst | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/runtests.rst b/runtests.rst
--- a/runtests.rst
+++ b/runtests.rst
@@ -39,12 +39,17 @@
./python -m test -h
-If you want to run a single test, simply specify the test name as an argument.
-You also probably want to enable verbose mode (using ``-v``), so that individual
-failures are detailed::
+If you want to run a single test file, simply specify the test file name
+(without the extension) as an argument. You also probably want to enable
+verbose mode (using ``-v``), so that individual failures are detailed::
./python -m test -v test_abc
+To run a single test case, use the ``unittest`` module, providing the import
+path to the test case::
+
+ ./python -m unittest -v test.test_abc.TestABC
+
If you have a multi-core or multi-CPU machine, you can enable parallel testing
using several Python processes so as to speed up things::
--
Repository URL: http://hg.python.org/devguide
More information about the Python-checkins
mailing list