From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Tue, 31 Aug 2021 19:24:48 +0000 (-0700) Subject: bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102) X-Git-Tag: v3.9.8~199 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2280bc116301d45efc4d69cea452d272fdcd05b1;p=thirdparty%2FPython%2Fcpython.git bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102) (cherry picked from commit 22fe0eb13c3441b71b60aaea0e7fe289a29783da) Co-authored-by: Terry Jan Reedy --- diff --git a/Lib/idlelib/idle_test/test_macosx.py b/Lib/idlelib/idle_test/test_macosx.py index 193247735868..86da8849e5ca 100644 --- a/Lib/idlelib/idle_test/test_macosx.py +++ b/Lib/idlelib/idle_test/test_macosx.py @@ -12,6 +12,15 @@ nontypes = {'other'} alltypes = mactypes | nontypes +def setUpModule(): + global orig_tktype + orig_tktype = macosx._tk_type + + +def tearDownModule(): + macosx._tk_type = orig_tktype + + class InitTktypeTest(unittest.TestCase): "Test _init_tk_type."