summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tk.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-10-13 16:59:04 (GMT)
committerGitHub <noreply@github.com>2021-10-13 16:59:04 (GMT)
commit151234f5da4b1922e3d91233a6eddda92d7269b0 (patch)
treebcaf5ece5161c10f2ff9bf5bab5358e0de3b3a6e /Lib/test/test_tk.py
parent5abb2dec2cf147ce71cd15bcfda1bd095818f222 (diff)
downloadcpython-151234f5da4b1922e3d91233a6eddda92d7269b0.zip
cpython-151234f5da4b1922e3d91233a6eddda92d7269b0.tar.gz
cpython-151234f5da4b1922e3d91233a6eddda92d7269b0.tar.bz2
bpo-45229: Make tkinter tests discoverable (GH-28637) (GH-28927)
(cherry picked from commit f59ed3c310a7ceebf2a56a84ea969a7f75d95b64) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/test/test_tk.py')
-rw-r--r--Lib/test/test_tk.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/Lib/test/test_tk.py b/Lib/test/test_tk.py
index 59842a5..69cc2322 100644
--- a/Lib/test/test_tk.py
+++ b/Lib/test/test_tk.py
@@ -6,11 +6,9 @@ import_helper.import_module('_tkinter')
# Skip test if tk cannot be initialized.
support.requires('gui')
-from tkinter.test import runtktests
+def load_tests(loader, tests, pattern):
+ return loader.discover('tkinter.test.test_tkinter')
-def test_main():
- support.run_unittest(
- *runtktests.get_tests(text=False, packages=['test_tkinter']))
if __name__ == '__main__':
- test_main()
+ unittest.main()