| 1 |
import sys |
| 2 |
import unittest |
| 3 |
from test import support |
| 4 |
from test.support import import_helper |
| 5 |
from test.support import check_sanitizer |
| 6 |
|
| 7 |
if check_sanitizer(address=True, memory=True): |
| 8 |
raise unittest.SkipTest("Tests involvin libX11 can SEGFAULT on ASAN/MSAN builds") |
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
_tkinter = import_helper.import_module('_tkinter') |
| 13 |
|
| 14 |
|
| 15 |
support.requires('gui') |
| 16 |
|
| 17 |
|
| 18 |
tix = import_helper.import_module('tkinter.tix', deprecated=True) |
| 19 |
from tkinter import TclError |
| 20 |
|
| 21 |
|
| 22 |
class TestTix(unittest.TestCase): |
| 23 |
|
| 24 |
def setUp(self): |
| 25 |
try: |
| 26 |
self.root = tix.Tk() |
| 27 |
except TclError: |
| 28 |
if sys.platform.startswith('win'): |
| 29 |
self.fail('Tix should always be available on Windows') |
| 30 |
self.skipTest('Tix not available') |
| 31 |
else: |
| 32 |
self.addCleanup(self.root.destroy) |
| 33 |
|
| 34 |
def test_tix_available(self): |
| 35 |
|
| 36 |
pass |
| 37 |
|
| 38 |
|
| 39 |
if __name__ == '__main__': |
| 40 |
unittest.main() |