Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add a note about direct test module invocation
  • Loading branch information
sobolevn authored Jan 23, 2022
commit d5d599925508082b6da06125ee0d6e98f5c1d22b
13 changes: 13 additions & 0 deletions runtests.rst
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, for example ``test_importlib``,
Comment thread
sobolevn marked this conversation as resolved.
Outdated
in other words: if some module does not have ``unittest.main()``
Comment thread
sobolevn marked this conversation as resolved.
Outdated
most likely it does not support direct invocation
Comment thread
sobolevn marked this conversation as resolved.
Outdated

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