diff --git a/Lib/test/test_tcl.py b/Lib/test/test_tcl.py --- a/Lib/test/test_tcl.py +++ b/Lib/test/test_tcl.py @@ -8,6 +8,9 @@ # Skip this test if the _tkinter module wasn't built. _tkinter = test_support.import_module('_tkinter') +# Make sure Tkinter._fix runs to set up the environment +test_support.import_fresh_module('Tkinter') + from Tkinter import Tcl from _tkinter import TclError diff --git a/Lib/test/test_tk.py b/Lib/test/test_tk.py --- a/Lib/test/test_tk.py +++ b/Lib/test/test_tk.py @@ -4,6 +4,9 @@ # Skip test if _tkinter wasn't built. test_support.import_module('_tkinter') +# Make sure Tkinter._fix runs to set up the environment +test_support.import_fresh_module('Tkinter') + this_dir = os.path.dirname(os.path.abspath(__file__)) lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir, 'lib-tk', 'test')) diff --git a/Lib/test/test_ttk_guionly.py b/Lib/test/test_ttk_guionly.py --- a/Lib/test/test_ttk_guionly.py +++ b/Lib/test/test_ttk_guionly.py @@ -5,6 +5,9 @@ # Skip this test if _tkinter wasn't built. test_support.import_module('_tkinter') +# Make sure Tkinter._fix runs to set up the environment +test_support.import_fresh_module('Tkinter') + this_dir = os.path.dirname(os.path.abspath(__file__)) lib_tk_test = os.path.abspath(os.path.join(this_dir, os.path.pardir, 'lib-tk', 'test')) diff --git a/Lib/test/test_ttk_textonly.py b/Lib/test/test_ttk_textonly.py --- a/Lib/test/test_ttk_textonly.py +++ b/Lib/test/test_ttk_textonly.py @@ -4,6 +4,9 @@ # Skip this test if _tkinter does not exist. test_support.import_module('_tkinter') +# Make sure Tkinter._fix runs to set up the environment +test_support.import_fresh_module('Tkinter') + this_dir = os.path.dirname(os.path.abspath(__file__)) lib_tk_test = os.path.abspath(os.path.join(this_dir, '..', 'lib-tk', 'test'))