FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Add a note about direct test module invocation by sobolevn · Pull Request #801 · python/devguide · GitHub

Repository navigation

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .rst  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
13 changes: 13 additions & 0 deletions runtests.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,19 @@ path to the test case::

./python -m unittest -v test.test_abc.TestABC_Py

Some test modules also support direct invocation,
which might be useful for IDEs and local debugging::

./python Lib/test/test_typing.py

But, there are several important notes:

1. This way of running tests exists only
for local developer needs and is discouraged for anything else
2. Some modules do not support it at all. One example is``test_importlib``.
In other words: if some module does not have ``unittest.main()``, then
most likely it does not support direct invocation.

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::

Expand Down

Back | FazBrowse Home | New Git URL