From 1b6760d9a8bc3070f7563c4ab2dff2f46ab3c2b9 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Tue, 31 Aug 2021 13:48:52 -0400 Subject: [PATCH] bpo-45059: Add module cleanup to IDLE test_macosx --- Lib/idlelib/idle_test/test_macosx.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Lib/idlelib/idle_test/test_macosx.py b/Lib/idlelib/idle_test/test_macosx.py index 19324773586896..86da8849e5ca00 100644 --- a/Lib/idlelib/idle_test/test_macosx.py +++ b/Lib/idlelib/idle_test/test_macosx.py @@ -12,6 +12,15 @@ 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."