Debian Codegraph @

Lib/test/test_idle.py

raw
1 import unittest
2 from test.support.import_helper import import_module
3 from test.support import check_sanitizer
4
5 if check_sanitizer(address=True, memory=True):
6 # See gh-90791 for details
7 raise unittest.SkipTest("Tests involving libX11 can SEGFAULT on ASAN/MSAN builds")
8
9 # Skip test_idle if _tkinter, tkinter, or idlelib are missing.
10 tk = import_module('tkinter') # Also imports _tkinter.
11 idlelib = import_module('idlelib')
12
13 # Before importing and executing more of idlelib,
14 # tell IDLE to avoid changing the environment.
15 idlelib.testing = True
16
17 # Unittest.main and test.libregrtest.runtest.runtest_inner
18 # call load_tests, when present here, to discover tests to run.
19 from idlelib.idle_test import load_tests
20
21 if __name__ == '__main__':
22 tk.NoDefaultRoot()
23 unittest.main(exit=False)
24 tk._support_default_root = True
25 tk._default_root = None