2013-07-28 01:00:20 -03:00
|
|
|
import unittest
|
2020-07-06 09:29:49 -03:00
|
|
|
from test.support.import_helper import import_module
|
2022-01-25 19:14:03 -04:00
|
|
|
from test.support import check_sanitizer
|
|
|
|
|
|
|
|
if check_sanitizer(address=True, memory=True):
|
2023-08-22 10:52:32 -03:00
|
|
|
# See gh-90791 for details
|
2023-05-04 10:03:52 -03:00
|
|
|
raise unittest.SkipTest("Tests involving libX11 can SEGFAULT on ASAN/MSAN builds")
|
2013-07-28 01:00:20 -03:00
|
|
|
|
2023-05-14 00:55:20 -03:00
|
|
|
# Skip test_idle if _tkinter, tkinter, or idlelib are missing.
|
2018-05-22 14:24:04 -03:00
|
|
|
tk = import_module('tkinter') # Also imports _tkinter.
|
2016-06-26 18:48:02 -03:00
|
|
|
idlelib = import_module('idlelib')
|
2013-05-27 22:32:03 -03:00
|
|
|
|
2018-05-22 14:24:04 -03:00
|
|
|
# Before importing and executing more of idlelib,
|
|
|
|
# tell IDLE to avoid changing the environment.
|
2016-08-16 01:10:14 -03:00
|
|
|
idlelib.testing = True
|
|
|
|
|
2018-05-22 14:24:04 -03:00
|
|
|
# Unittest.main and test.libregrtest.runtest.runtest_inner
|
|
|
|
# call load_tests, when present here, to discover tests to run.
|
2016-06-26 18:48:02 -03:00
|
|
|
from idlelib.idle_test import load_tests
|
2013-05-27 22:32:03 -03:00
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2016-08-16 01:10:14 -03:00
|
|
|
tk.NoDefaultRoot()
|
|
|
|
unittest.main(exit=False)
|
2020-12-19 06:17:08 -04:00
|
|
|
tk._support_default_root = True
|
2016-07-25 01:31:54 -03:00
|
|
|
tk._default_root = None
|