Visitar URL original
gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ by vstinner · Pull Request #94070 · python/cpython · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/
* Add Lib/test/test_ttk/__init__.py based on test_ttk_guionly.py.
* Remove Lib/test/test_ttk_guionly.py.
  • Loading branch information
vstinner committed Jun 22, 2022
commit 98443640659a9f9b8a0fb97756cb13e032f39644
11 changes: 6 additions & 5 deletions Lib/test/test_ttk_guionly.py → Lib/test/test_ttk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
import os.path
import unittest
from test import support
from test.support import import_helper
from test.support import check_sanitizer

if check_sanitizer(address=True, memory=True):
raise unittest.SkipTest("Tests involvin libX11 can SEGFAULT on ASAN/MSAN builds")
if support.check_sanitizer(address=True, memory=True):
raise unittest.SkipTest("Tests involving libX11 can SEGFAULT on ASAN/MSAN builds")

# Skip this test if _tkinter wasn't built.
import_helper.import_module('_tkinter')

# Skip test if tk cannot be initialized.
support.requires('gui')


import tkinter
from _tkinter import TclError
from tkinter import ttk
Expand All @@ -32,8 +33,8 @@ def setUpModule():
root.destroy()
del root

def load_tests(loader, tests, pattern):
return loader.discover('tkinter.test.test_ttk')
def load_tests(*args):
return support.load_package_tests(os.path.dirname(__file__), *args)


if __name__ == '__main__':
Expand Down
Empty file.