Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[3.9] bpo-23882: Doc: Clarify unittest discovery document (GH-21560) #24619

Merged
merged 1 commit into from
Feb 22, 2021
Merged
Changes from all commits
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
18 changes: 12 additions & 6 deletions Doc/library/unittest.rst
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,9 @@ Test modules and packages can customize test loading and discovery by through
the `load_tests protocol`_.

.. versionchanged:: 3.4
Test discovery supports :term:`namespace packages <namespace package>`.
Test discovery supports :term:`namespace packages <namespace package>`
for start directory. Note that you need to the top level directory too.
(e.g. ``python -m unittest discover -s root/namespace -t root``).


.. _organizing-tests:
Expand Down Expand Up @@ -1849,11 +1851,15 @@ Loading and running tests

.. versionchanged:: 3.4
Modules that raise :exc:`SkipTest` on import are recorded as skips,
not errors.
Discovery works for :term:`namespace packages <namespace package>`.
Paths are sorted before being imported so that execution order is
the same even if the underlying file system's ordering is not
dependent on file name.
not errors.

.. versionchanged:: 3.4
*start_dir* can be a :term:`namespace packages <namespace package>`.

.. versionchanged:: 3.4
Paths are sorted before being imported so that execution order is the
same even if the underlying file system's ordering is not dependent
on file name.

.. versionchanged:: 3.5
Found packages are now checked for ``load_tests`` regardless of
Expand Down