| 1 |
import os.path |
| 2 |
import unittest |
| 3 |
|
| 4 |
from test.support import ( |
| 5 |
check_sanitizer, |
| 6 |
import_helper, |
| 7 |
load_package_tests, |
| 8 |
requires, |
| 9 |
) |
| 10 |
|
| 11 |
|
| 12 |
if check_sanitizer(address=True, memory=True): |
| 13 |
# See gh-90791 for details |
| 14 |
raise unittest.SkipTest("Tests involving libX11 can SEGFAULT on ASAN/MSAN builds") |
| 15 |
|
| 16 |
# Skip test if _tkinter wasn't built. |
| 17 |
import_helper.import_module('_tkinter') |
| 18 |
|
| 19 |
# Skip test if tk cannot be initialized. |
| 20 |
requires('gui') |
| 21 |
|
| 22 |
|
| 23 |
def load_tests(*args): |
| 24 |
return load_package_tests(os.path.dirname(__file__), *args) |
| 25 |
|
| 26 |
def setUpModule(): |
| 27 |
wantobjects = support.get_resource_value('wantobjects') |
| 28 |
if wantobjects is not None: |
| 29 |
unittest.enterModuleContext( |
| 30 |
support.swap_attr(tkinter, 'wantobjects', int(wantobjects))) |