cpython/Lib/distutils/tests/test_versionpredicate.py
Serhiy Storchaka 14167031eb
[3.11] gh-111309: Use unittest to collect and run distutils tests (GH-111311)
* 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
2023-10-25 14:57:17 +03:00

13 lines
278 B
Python

"""Tests harness for distutils.versionpredicate.
"""
import distutils.versionpredicate
import doctest
def load_tests(loader, tests, pattern):
tests.addTest(doctest.DocTestSuite(distutils.versionpredicate))
return tests
if __name__ == '__main__':
unittest.main()