New GitHub issue #111309 from serhiy-storchaka:<br>

<hr>

<pre>
Currently every test module in the `distutils.tests` package has function `test_suite()` which explicitly creates `unittest.TestLoader` and loads it by calling `loadTestsFromTestCase()` for every test class. Then `test_main` merges all these tests and runs them with `test.support.run_unittest()`. But `test.support.run_unittest()` will be removed (see #111165). Also, the `distutils.tests` package cannot be run via `unittest`, it does not search tests in submodules by default, and when run tests in submodules separately via `unittest`, it misses some doctests because they cannot be automatically loaded.

The following PR contains the following changes:

* use `unittest.main()` instead of `run_unittest(test_suite())` to run tests from modules via the CLI
* add explicit `load_tests()` to load doctests
* use `test.support.load_package_tests()` to load tests in submodules of `distutils.tests`
* removes no longer needed `test_suite()` functions

</pre>

<hr>

<a href="https://github.com/python/cpython/issues/111309">View on GitHub</a>
<p>Labels: tests, 3.11</p>
<p>Assignee: </p>