[Python-checkins] bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102)

terryjreedy webhook-mailer at python.org
Tue Aug 31 14:59:42 EDT 2021


https://github.com/python/cpython/commit/22fe0eb13c3441b71b60aaea0e7fe289a29783da
commit: 22fe0eb13c3441b71b60aaea0e7fe289a29783da
branch: main
author: Terry Jan Reedy <tjreedy at udel.edu>
committer: terryjreedy <tjreedy at udel.edu>
date: 2021-08-31T14:59:35-04:00
summary:

bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102)

files:
M Lib/idlelib/idle_test/test_macosx.py

diff --git a/Lib/idlelib/idle_test/test_macosx.py b/Lib/idlelib/idle_test/test_macosx.py
index 1932477358689..86da8849e5ca0 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."
 



More information about the Python-checkins mailing list