diff options
author | Victor Stinner <vstinner@python.org> | 2022-06-22 20:23:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-22 20:23:37 (GMT) |
commit | c1fb12e5afa09aca3134a9bc0116c31dbcccc5e9 (patch) | |
tree | 0e730c9d6f9275d2870910a28be48d0bc3a5d9af | |
parent | 47e35625ff2c4e6511a12e7178c3e4fbc965b634 (diff) | |
download | cpython-c1fb12e5afa09aca3134a9bc0116c31dbcccc5e9.zip cpython-c1fb12e5afa09aca3134a9bc0116c31dbcccc5e9.tar.gz cpython-c1fb12e5afa09aca3134a9bc0116c31dbcccc5e9.tar.bz2 |
gh-54781: Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/ (#94070)
* Move Lib/tkinter/test/test_tkinter/ to Lib/test/test_tkinter/.
* Move Lib/tkinter/test/test_ttk/ to Lib/test/test_ttk/.
* Add Lib/test/test_ttk/__init__.py based on test_ttk_guionly.py.
* Add Lib/test/test_tkinter/__init__.py
* Remove old Lib/test/test_tk.py.
* Remove old Lib/test/test_ttk_guionly.py.
* Add __main__ sub-modules.
* Update imports and update references to rename files.
-rw-r--r-- | Lib/test/test_tk.py | 20 | ||||
-rw-r--r-- | Lib/test/test_tkinter/README (renamed from Lib/tkinter/test/README) | 0 | ||||
-rw-r--r-- | Lib/test/test_tkinter/__init__.py | 18 | ||||
-rw-r--r-- | Lib/test/test_tkinter/__main__.py | 4 | ||||
-rw-r--r-- | Lib/test/test_tkinter/support.py (renamed from Lib/tkinter/test/support.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_colorchooser.py (renamed from Lib/tkinter/test/test_tkinter/test_colorchooser.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_font.py (renamed from Lib/tkinter/test/test_tkinter/test_font.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_geometry_managers.py (renamed from Lib/tkinter/test/test_tkinter/test_geometry_managers.py) | 4 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_images.py (renamed from Lib/tkinter/test/test_tkinter/test_images.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_loadtk.py (renamed from Lib/tkinter/test/test_tkinter/test_loadtk.py) | 0 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_messagebox.py (renamed from Lib/tkinter/test/test_tkinter/test_messagebox.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_misc.py (renamed from Lib/tkinter/test/test_tkinter/test_misc.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_simpledialog.py (renamed from Lib/tkinter/test/test_tkinter/test_simpledialog.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_text.py (renamed from Lib/tkinter/test/test_tkinter/test_text.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_variables.py (renamed from Lib/tkinter/test/test_tkinter/test_variables.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_tkinter/test_widgets.py (renamed from Lib/tkinter/test/test_tkinter/test_widgets.py) | 4 | ||||
-rw-r--r-- | Lib/test/test_tkinter/widget_tests.py (renamed from Lib/tkinter/test/widget_tests.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_ttk/__init__.py (renamed from Lib/test/test_ttk_guionly.py) | 15 | ||||
-rw-r--r-- | Lib/test/test_ttk/__main__.py | 4 | ||||
-rw-r--r-- | Lib/test/test_ttk/test_extensions.py (renamed from Lib/tkinter/test/test_ttk/test_extensions.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_ttk/test_style.py (renamed from Lib/tkinter/test/test_ttk/test_style.py) | 2 | ||||
-rw-r--r-- | Lib/test/test_ttk/test_widgets.py (renamed from Lib/tkinter/test/test_ttk/test_widgets.py) | 4 | ||||
-rw-r--r-- | Lib/tkinter/test/__init__.py | 0 | ||||
-rw-r--r-- | Lib/tkinter/test/test_tkinter/__init__.py | 0 | ||||
-rw-r--r-- | Lib/tkinter/test/test_ttk/__init__.py | 0 | ||||
-rw-r--r-- | Makefile.pre.in | 6 | ||||
-rw-r--r-- | Misc/NEWS.d/next/Tests/2022-06-21-17-37-46.gh-issue-54781.BjVAVg.rst | 2 | ||||
-rw-r--r-- | PCbuild/lib.pyproj | 93 | ||||
-rwxr-xr-x | Tools/wasm/wasm_assets.py | 13 |
29 files changed, 100 insertions, 109 deletions
diff --git a/Lib/test/test_tk.py b/Lib/test/test_tk.py deleted file mode 100644 index 8f90cba..0000000 --- a/Lib/test/test_tk.py +++ /dev/null @@ -1,20 +0,0 @@ -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") - -# 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(loader, tests, pattern): - return loader.discover('tkinter.test.test_tkinter') - - -if __name__ == '__main__': - unittest.main() diff --git a/Lib/tkinter/test/README b/Lib/test/test_tkinter/README index 79cd16c..79cd16c 100644 --- a/Lib/tkinter/test/README +++ b/Lib/test/test_tkinter/README diff --git a/Lib/test/test_tkinter/__init__.py b/Lib/test/test_tkinter/__init__.py new file mode 100644 index 0000000..edcb449 --- /dev/null +++ b/Lib/test/test_tkinter/__init__.py @@ -0,0 +1,18 @@ +import os.path +import unittest +from test import support +from test.support import import_helper + + +if support.check_sanitizer(address=True, memory=True): + raise unittest.SkipTest("Tests involving 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) diff --git a/Lib/test/test_tkinter/__main__.py b/Lib/test/test_tkinter/__main__.py new file mode 100644 index 0000000..40a23a2 --- /dev/null +++ b/Lib/test/test_tkinter/__main__.py @@ -0,0 +1,4 @@ +from . import load_tests +import unittest + +unittest.main() diff --git a/Lib/tkinter/test/support.py b/Lib/test/test_tkinter/support.py index 9154eba..9154eba 100644 --- a/Lib/tkinter/test/support.py +++ b/Lib/test/test_tkinter/support.py diff --git a/Lib/tkinter/test/test_tkinter/test_colorchooser.py b/Lib/test/test_tkinter/test_colorchooser.py index 488162f..9bba213 100644 --- a/Lib/tkinter/test/test_tkinter/test_colorchooser.py +++ b/Lib/test/test_tkinter/test_colorchooser.py @@ -1,7 +1,7 @@ import unittest import tkinter from test.support import requires, swap_attr -from tkinter.test.support import AbstractDefaultRootTest, AbstractTkTest +from test.test_tkinter.support import AbstractDefaultRootTest, AbstractTkTest from tkinter import colorchooser from tkinter.colorchooser import askcolor from tkinter.commondialog import Dialog diff --git a/Lib/tkinter/test/test_tkinter/test_font.py b/Lib/test/test_tkinter/test_font.py index 058c53a..563707d 100644 --- a/Lib/tkinter/test/test_tkinter/test_font.py +++ b/Lib/test/test_tkinter/test_font.py @@ -2,7 +2,7 @@ import unittest import tkinter from tkinter import font from test.support import requires, gc_collect, ALWAYS_EQ -from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest +from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest requires('gui') diff --git a/Lib/tkinter/test/test_tkinter/test_geometry_managers.py b/Lib/test/test_tkinter/test_geometry_managers.py index c89bc8d..3663048 100644 --- a/Lib/tkinter/test/test_tkinter/test_geometry_managers.py +++ b/Lib/test/test_tkinter/test_geometry_managers.py @@ -4,8 +4,8 @@ import tkinter from tkinter import TclError from test.support import requires -from tkinter.test.support import pixels_conv -from tkinter.test.widget_tests import AbstractWidgetTest +from test.test_tkinter.support import pixels_conv +from test.test_tkinter.widget_tests import AbstractWidgetTest requires('gui') diff --git a/Lib/tkinter/test/test_tkinter/test_images.py b/Lib/test/test_tkinter/test_images.py index cc69cca..b6f8b79 100644 --- a/Lib/tkinter/test/test_tkinter/test_images.py +++ b/Lib/test/test_tkinter/test_images.py @@ -2,7 +2,7 @@ import unittest import tkinter from test import support from test.support import os_helper -from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest, requires_tcl +from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest, requires_tcl support.requires('gui') diff --git a/Lib/tkinter/test/test_tkinter/test_loadtk.py b/Lib/test/test_tkinter/test_loadtk.py index 61b0eda..61b0eda 100644 --- a/Lib/tkinter/test/test_tkinter/test_loadtk.py +++ b/Lib/test/test_tkinter/test_loadtk.py diff --git a/Lib/tkinter/test/test_tkinter/test_messagebox.py b/Lib/test/test_tkinter/test_messagebox.py index d38541a..f41bdc9 100644 --- a/Lib/tkinter/test/test_tkinter/test_messagebox.py +++ b/Lib/test/test_tkinter/test_messagebox.py @@ -1,7 +1,7 @@ import unittest import tkinter from test.support import requires, swap_attr -from tkinter.test.support import AbstractDefaultRootTest +from test.test_tkinter.support import AbstractDefaultRootTest from tkinter.commondialog import Dialog from tkinter.messagebox import showinfo diff --git a/Lib/tkinter/test/test_tkinter/test_misc.py b/Lib/test/test_tkinter/test_misc.py index 620b6ed..d1aca58 100644 --- a/Lib/tkinter/test/test_tkinter/test_misc.py +++ b/Lib/test/test_tkinter/test_misc.py @@ -3,7 +3,7 @@ import unittest import tkinter import enum from test import support -from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest +from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest support.requires('gui') diff --git a/Lib/tkinter/test/test_tkinter/test_simpledialog.py b/Lib/test/test_tkinter/test_simpledialog.py index 18cd271..502f7f7 100644 --- a/Lib/tkinter/test/test_tkinter/test_simpledialog.py +++ b/Lib/test/test_tkinter/test_simpledialog.py @@ -1,7 +1,7 @@ import unittest import tkinter from test.support import requires, swap_attr -from tkinter.test.support import AbstractDefaultRootTest +from test.test_tkinter.support import AbstractDefaultRootTest from tkinter.simpledialog import Dialog, askinteger requires('gui') diff --git a/Lib/tkinter/test/test_tkinter/test_text.py b/Lib/test/test_tkinter/test_text.py index 482f150..d1583f0 100644 --- a/Lib/tkinter/test/test_tkinter/test_text.py +++ b/Lib/test/test_tkinter/test_text.py @@ -1,7 +1,7 @@ import unittest import tkinter from test.support import requires -from tkinter.test.support import AbstractTkTest +from test.test_tkinter.support import AbstractTkTest requires('gui') diff --git a/Lib/tkinter/test/test_tkinter/test_variables.py b/Lib/test/test_tkinter/test_variables.py index 427e168..c1d232e 100644 --- a/Lib/tkinter/test/test_tkinter/test_variables.py +++ b/Lib/test/test_tkinter/test_variables.py @@ -6,7 +6,7 @@ import tkinter from tkinter import (Variable, StringVar, IntVar, DoubleVar, BooleanVar, Tcl, TclError) from test.support import ALWAYS_EQ -from tkinter.test.support import AbstractDefaultRootTest +from test.test_tkinter.support import AbstractDefaultRootTest class Var(Variable): diff --git a/Lib/tkinter/test/test_tkinter/test_widgets.py b/Lib/test/test_tkinter/test_widgets.py index fe8ecfe..1cddbe1 100644 --- a/Lib/tkinter/test/test_tkinter/test_widgets.py +++ b/Lib/test/test_tkinter/test_widgets.py @@ -4,10 +4,10 @@ from tkinter import TclError import os from test.support import requires -from tkinter.test.support import (requires_tcl, +from test.test_tkinter.support import (requires_tcl, get_tk_patchlevel, widget_eq, AbstractDefaultRootTest) -from tkinter.test.widget_tests import ( +from test.test_tkinter.widget_tests import ( add_standard_options, AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests, setUpModule) diff --git a/Lib/tkinter/test/widget_tests.py b/Lib/test/test_tkinter/widget_tests.py index 8418154..85b0511 100644 --- a/Lib/tkinter/test/widget_tests.py +++ b/Lib/test/test_tkinter/widget_tests.py @@ -1,7 +1,7 @@ # Common tests for test_tkinter/test_widgets.py and test_ttk/test_widgets.py import tkinter -from tkinter.test.support import (AbstractTkTest, tcl_version, +from test.test_tkinter.support import (AbstractTkTest, tcl_version, pixels_conv, tcl_obj_eq) import test.support diff --git a/Lib/test/test_ttk_guionly.py b/Lib/test/test_ttk/__init__.py index c491904..7ee7ffb 100644 --- a/Lib/test/test_ttk_guionly.py +++ b/Lib/test/test_ttk/__init__.py @@ -1,10 +1,11 @@ +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') @@ -12,6 +13,7 @@ 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 @@ -32,9 +34,6 @@ def setUpModule(): root.destroy() del root -def load_tests(loader, tests, pattern): - return loader.discover('tkinter.test.test_ttk') - -if __name__ == '__main__': - unittest.main() +def load_tests(*args): + return support.load_package_tests(os.path.dirname(__file__), *args) diff --git a/Lib/test/test_ttk/__main__.py b/Lib/test/test_ttk/__main__.py new file mode 100644 index 0000000..40a23a2 --- /dev/null +++ b/Lib/test/test_ttk/__main__.py @@ -0,0 +1,4 @@ +from . import load_tests +import unittest + +unittest.main() diff --git a/Lib/tkinter/test/test_ttk/test_extensions.py b/Lib/test/test_ttk/test_extensions.py index 1220c48..6135c49 100644 --- a/Lib/tkinter/test/test_ttk/test_extensions.py +++ b/Lib/test/test_ttk/test_extensions.py @@ -3,7 +3,7 @@ import unittest import tkinter from tkinter import ttk from test.support import requires, gc_collect -from tkinter.test.support import AbstractTkTest, AbstractDefaultRootTest +from test.test_tkinter.support import AbstractTkTest, AbstractDefaultRootTest requires('gui') diff --git a/Lib/tkinter/test/test_ttk/test_style.py b/Lib/test/test_ttk/test_style.py index 54ad343..0ec95cf 100644 --- a/Lib/tkinter/test/test_ttk/test_style.py +++ b/Lib/test/test_ttk/test_style.py @@ -4,7 +4,7 @@ import tkinter from tkinter import ttk from test import support from test.support import requires -from tkinter.test.support import AbstractTkTest, get_tk_patchlevel +from test.test_tkinter.support import AbstractTkTest, get_tk_patchlevel requires('gui') diff --git a/Lib/tkinter/test/test_ttk/test_widgets.py b/Lib/test/test_ttk/test_widgets.py index c14c321..eb0cc93 100644 --- a/Lib/tkinter/test/test_ttk/test_widgets.py +++ b/Lib/test/test_ttk/test_widgets.py @@ -5,9 +5,9 @@ from test.support import requires, gc_collect import sys from test.test_ttk_textonly import MockTclObj -from tkinter.test.support import (AbstractTkTest, tcl_version, get_tk_patchlevel, +from test.test_tkinter.support import (AbstractTkTest, tcl_version, get_tk_patchlevel, simulate_mouse_click, AbstractDefaultRootTest) -from tkinter.test.widget_tests import (add_standard_options, +from test.test_tkinter.widget_tests import (add_standard_options, AbstractWidgetTest, StandardOptionsTests, IntegerSizeTests, PixelSizeTests, setUpModule) diff --git a/Lib/tkinter/test/__init__.py b/Lib/tkinter/test/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/Lib/tkinter/test/__init__.py +++ /dev/null diff --git a/Lib/tkinter/test/test_tkinter/__init__.py b/Lib/tkinter/test/test_tkinter/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/Lib/tkinter/test/test_tkinter/__init__.py +++ /dev/null diff --git a/Lib/tkinter/test/test_ttk/__init__.py b/Lib/tkinter/test/test_ttk/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/Lib/tkinter/test/test_ttk/__init__.py +++ /dev/null diff --git a/Makefile.pre.in b/Makefile.pre.in index 6448785..5d0ae6b 100644 --- a/Makefile.pre.in +++ b/Makefile.pre.in @@ -1987,15 +1987,15 @@ TESTSUBDIRS= distutils/tests \ test/test_lib2to3/data/fixers \ test/test_lib2to3/data/fixers/myfixes \ test/test_peg_generator \ + test/test_tkinter \ test/test_tools \ + test/test_ttk \ test/test_warnings test/test_warnings/data \ test/test_zoneinfo test/test_zoneinfo/data \ test/test_unittest test/test_unittest/testmock \ test/tracedmodules \ test/xmltestdata test/xmltestdata/c14n-20 \ - test/ziptestdata \ - tkinter/test tkinter/test/test_tkinter \ - tkinter/test/test_ttk + test/ziptestdata TEST_MODULES=@TEST_MODULES@ libinstall: all $(srcdir)/Modules/xxmodule.c diff --git a/Misc/NEWS.d/next/Tests/2022-06-21-17-37-46.gh-issue-54781.BjVAVg.rst b/Misc/NEWS.d/next/Tests/2022-06-21-17-37-46.gh-issue-54781.BjVAVg.rst new file mode 100644 index 0000000..f7ae7b9 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2022-06-21-17-37-46.gh-issue-54781.BjVAVg.rst @@ -0,0 +1,2 @@ +Rename test_tk to test_tkinter, and rename test_ttk_guionly to test_ttk. +Patch by Victor Stinner. diff --git a/PCbuild/lib.pyproj b/PCbuild/lib.pyproj index 2355eb5..0556efe 100644 --- a/PCbuild/lib.pyproj +++ b/PCbuild/lib.pyproj @@ -1323,7 +1323,17 @@ <Compile Include="test\test_timeit.py" /> <Compile Include="test\test_timeout.py" /> <Compile Include="test\test_tix.py" /> - <Compile Include="test\test_tk.py" /> + <Compile Include="test\test_tkinter\__init__.py" /> + <Compile Include="test\test_tkinter\support.py" /> + <Compile Include="test\test_tkinter\test_font.py" /> + <Compile Include="test\test_tkinter\test_geometry_managers.py" /> + <Compile Include="test\test_tkinter\test_images.py" /> + <Compile Include="test\test_tkinter\test_loadtk.py" /> + <Compile Include="test\test_tkinter\test_misc.py" /> + <Compile Include="test\test_tkinter\test_text.py" /> + <Compile Include="test\test_tkinter\test_variables.py" /> + <Compile Include="test\test_tkinter\test_widgets.py" /> + <Compile Include="test\test_tkinter\widget_tests.py" /> <Compile Include="test\test_tokenize.py" /> <Compile Include="test\test_tools\test_fixcid.py" /> <Compile Include="test\test_tools\test_gprof2html.py" /> @@ -1339,8 +1349,11 @@ <Compile Include="test\test_trace.py" /> <Compile Include="test\test_traceback.py" /> <Compile Include="test\test_tracemalloc.py" /> - <Compile Include="test\test_ttk_guionly.py" /> <Compile Include="test\test_ttk_textonly.py" /> + <Compile Include="test\test_ttk\__init__.py" /> + <Compile Include="test\test_ttk\test_extensions.py" /> + <Compile Include="test\test_ttk\test_style.py" /> + <Compile Include="test\test_ttk\test_widgets.py" /> <Compile Include="test\test_tuple.py" /> <Compile Include="test\test_turtle.py" /> <Compile Include="test\test_typechecks.py" /> @@ -1353,7 +1366,33 @@ <Compile Include="test\test_unicode_file.py" /> <Compile Include="test\test_unicode_file_functions.py" /> <Compile Include="test\test_unicode_identifiers.py" /> - <Compile Include="test\test_unittest.py" /> + <Compile Include="test\test_unittest\dummy.py" /> + <Compile Include="test\test_unittest\support.py" /> + <Compile Include="test\test_unittest\testmock\support.py" /> + <Compile Include="test\test_unittest\testmock\testcallable.py" /> + <Compile Include="test\test_unittest\testmock\testhelpers.py" /> + <Compile Include="test\test_unittest\testmock\testmagicmethods.py" /> + <Compile Include="test\test_unittest\testmock\testmock.py" /> + <Compile Include="test\test_unittest\testmock\testpatch.py" /> + <Compile Include="test\test_unittest\testmock\testsentinel.py" /> + <Compile Include="test\test_unittest\testmock\testwith.py" /> + <Compile Include="test\test_unittest\testmock\__init__.py" /> + <Compile Include="test\test_unittest\testmock\__main__.py" /> + <Compile Include="test\test_unittest\test_assertions.py" /> + <Compile Include="test\test_unittest\test_break.py" /> + <Compile Include="test\test_unittest\test_case.py" /> + <Compile Include="test\test_unittest\test_discovery.py" /> + <Compile Include="test\test_unittest\test_functiontestcase.py" /> + <Compile Include="test\test_unittest\test_loader.py" /> + <Compile Include="test\test_unittest\test_program.py" /> + <Compile Include="test\test_unittest\test_result.py" /> + <Compile Include="test\test_unittest\test_runner.py" /> + <Compile Include="test\test_unittest\test_setups.py" /> + <Compile Include="test\test_unittest\test_skipping.py" /> + <Compile Include="test\test_unittest\test_suite.py" /> + <Compile Include="test\test_unittest\_test_warnings.py" /> + <Compile Include="test\test_unittest\__init__.py" /> + <Compile Include="test\test_unittest\__main__.py" /> <Compile Include="test\test_univnewlines.py" /> <Compile Include="test\test_unpack.py" /> <Compile Include="test\test_unpack_ex.py" /> @@ -1432,22 +1471,6 @@ <Compile Include="tkinter\messagebox.py" /> <Compile Include="tkinter\scrolledtext.py" /> <Compile Include="tkinter\simpledialog.py" /> - <Compile Include="tkinter\test\support.py" /> - <Compile Include="tkinter\test\test_tkinter\test_font.py" /> - <Compile Include="tkinter\test\test_tkinter\test_geometry_managers.py" /> - <Compile Include="tkinter\test\test_tkinter\test_images.py" /> - <Compile Include="tkinter\test\test_tkinter\test_loadtk.py" /> - <Compile Include="tkinter\test\test_tkinter\test_misc.py" /> - <Compile Include="tkinter\test\test_tkinter\test_text.py" /> - <Compile Include="tkinter\test\test_tkinter\test_variables.py" /> - <Compile Include="tkinter\test\test_tkinter\test_widgets.py" /> - <Compile Include="tkinter\test\test_tkinter\__init__.py" /> - <Compile Include="tkinter\test\test_ttk\test_extensions.py" /> - <Compile Include="tkinter\test\test_ttk\test_style.py" /> - <Compile Include="tkinter\test\test_ttk\test_widgets.py" /> - <Compile Include="tkinter\test\test_ttk\__init__.py" /> - <Compile Include="tkinter\test\widget_tests.py" /> - <Compile Include="tkinter\test\__init__.py" /> <Compile Include="tkinter\tix.py" /> <Compile Include="tkinter\ttk.py" /> <Compile Include="tkinter\__init__.py" /> @@ -1490,33 +1513,6 @@ <Compile Include="unittest\runner.py" /> <Compile Include="unittest\signals.py" /> <Compile Include="unittest\suite.py" /> - <Compile Include="test\test_unittest\dummy.py" /> - <Compile Include="test\test_unittest\support.py" /> - <Compile Include="test\test_unittest\testmock\support.py" /> - <Compile Include="test\test_unittest\testmock\testcallable.py" /> - <Compile Include="test\test_unittest\testmock\testhelpers.py" /> - <Compile Include="test\test_unittest\testmock\testmagicmethods.py" /> - <Compile Include="test\test_unittest\testmock\testmock.py" /> - <Compile Include="test\test_unittest\testmock\testpatch.py" /> - <Compile Include="test\test_unittest\testmock\testsentinel.py" /> - <Compile Include="test\test_unittest\testmock\testwith.py" /> - <Compile Include="test\test_unittest\testmock\__init__.py" /> - <Compile Include="test\test_unittest\testmock\__main__.py" /> - <Compile Include="test\test_unittest\test_assertions.py" /> - <Compile Include="test\test_unittest\test_break.py" /> - <Compile Include="test\test_unittest\test_case.py" /> - <Compile Include="test\test_unittest\test_discovery.py" /> - <Compile Include="test\test_unittest\test_functiontestcase.py" /> - <Compile Include="test\test_unittest\test_loader.py" /> - <Compile Include="test\test_unittest\test_program.py" /> - <Compile Include="test\test_unittest\test_result.py" /> - <Compile Include="test\test_unittest\test_runner.py" /> - <Compile Include="test\test_unittest\test_setups.py" /> - <Compile Include="test\test_unittest\test_skipping.py" /> - <Compile Include="test\test_unittest\test_suite.py" /> - <Compile Include="test\test_unittest\_test_warnings.py" /> - <Compile Include="test\test_unittest\__init__.py" /> - <Compile Include="test\test_unittest\__main__.py" /> <Compile Include="unittest\util.py" /> <Compile Include="unittest\__init__.py" /> <Compile Include="unittest\__main__.py" /> @@ -1802,16 +1798,15 @@ <Folder Include="test\test_lib2to3\data\fixers" /> <Folder Include="test\test_lib2to3\data\fixers\myfixes" /> <Folder Include="test\test_peg_generator" /> + <Folder Include="test\test_tkinter" /> <Folder Include="test\test_tools" /> + <Folder Include="test\test_ttk" /> <Folder Include="test\test_unittest" /> <Folder Include="test\test_unittest\testmock" /> <Folder Include="test\test_warnings" /> <Folder Include="test\test_warnings\data" /> <Folder Include="test\tracedmodules" /> <Folder Include="tkinter" /> - <Folder Include="tkinter\test" /> - <Folder Include="tkinter\test\test_tkinter" /> - <Folder Include="tkinter\test\test_ttk" /> <Folder Include="turtledemo" /> <Folder Include="unittest" /> <Folder Include="urllib" /> diff --git a/Tools/wasm/wasm_assets.py b/Tools/wasm/wasm_assets.py index 67afde6..a59db9d 100755 --- a/Tools/wasm/wasm_assets.py +++ b/Tools/wasm/wasm_assets.py @@ -109,11 +109,6 @@ OMIT_MODULE_FILES = { "_zoneinfo": ["zoneinfo/"], } -# regression test sub directories -OMIT_SUBDIRS = ( - "tkinter/test/", -) - def get_builddir(args: argparse.Namespace) -> pathlib.Path: """Get builddir path from pybuilddir.txt """ @@ -136,9 +131,6 @@ def create_stdlib_zip( *, optimize: int = 0, ) -> None: - def filterfunc(name: str) -> bool: - return not name.startswith(args.omit_subdirs_absolute) - with zipfile.PyZipFile( args.wasm_stdlib_zip, mode="w", compression=args.compression, optimize=optimize ) as pzf: @@ -152,7 +144,7 @@ def create_stdlib_zip( continue if entry.name.endswith(".py") or entry.is_dir(): # writepy() writes .pyc files (bytecode). - pzf.writepy(entry, filterfunc=filterfunc) + pzf.writepy(entry) def detect_extension_modules(args: argparse.Namespace): @@ -234,9 +226,6 @@ def main(): omit_files.extend(modfiles) args.omit_files_absolute = {args.srcdir_lib / name for name in omit_files} - args.omit_subdirs_absolute = tuple( - str(args.srcdir_lib / name) for name in OMIT_SUBDIRS - ) # Empty, unused directory for dynamic libs, but required for site initialization. args.wasm_dynload.mkdir(parents=True, exist_ok=True) |