[Python-checkins] Fix so that test.test_distutils can be executed by unittest and not just regrtest (GH-13480)

Cheryl Sabella webhook-mailer at python.org
Mon Jan 27 07:08:59 EST 2020


https://github.com/python/cpython/commit/997443c14cc29e5616b9f3d7c337e89fda60de11
commit: 997443c14cc29e5616b9f3d7c337e89fda60de11
branch: master
author: Toshio Kuratomi <a.badger at gmail.com>
committer: Cheryl Sabella <cheryl.sabella at gmail.com>
date: 2020-01-27T07:08:39-05:00
summary:

Fix so that test.test_distutils can be executed by unittest and not just regrtest (GH-13480)

files:
M Lib/test/test_distutils.py

diff --git a/Lib/test/test_distutils.py b/Lib/test/test_distutils.py
index d613abe453b56..a37f11791754d 100644
--- a/Lib/test/test_distutils.py
+++ b/Lib/test/test_distutils.py
@@ -10,9 +10,15 @@
 
 
 def test_main():
+    # used by regrtest
     test.support.run_unittest(distutils.tests.test_suite())
     test.support.reap_children()
 
 
+def load_tests(*_):
+    # used by unittest
+    return distutils.tests.test_suite()
+
+
 if __name__ == "__main__":
     test_main()



More information about the Python-checkins mailing list