8000 gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ by vstinner · Pull Request #94070 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ #94070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 22, 2022
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
Prev Previous commit
Next Next commit
Add Lib/test/test_tkinter/__init__.py
Remove Lib/test/test_tk.py.
  • Loading branch information
vstinner committed Jun 22, 2022
commit 8ee5ffe744d68908b2bba40f62bfeb2c1424d95b
20 changes: 0 additions & 20 deletions Lib/test/test_tk.py

This file was deleted.

17 changes: 17 additions & 0 deletions Lib/test/test_tkinter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import os.path
from test import support
from test.support import import_helper


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

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

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


def load_tests(*args):
return support.load_package_tests(os.path.dirname(__file__), *args)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use just loader.discover()?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copy/paste the code from test_asyncio, it works, so I didn't change it :-)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does loader.discover() work with zipimport?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does loader.discover() work with zipimport?

I have no idea. If there is an issue, I suggest to fix all load_tests() functions of Lib/test/ in a separated PR.

0