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

miss-islington webhook-mailer at python.org
Tue Aug 31 15:24:54 EDT 2021


https://github.com/python/cpython/commit/2280bc116301d45efc4d69cea452d272fdcd05b1
commit: 2280bc116301d45efc4d69cea452d272fdcd05b1
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2021-08-31T12:24:48-07:00
summary:

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

(cherry picked from commit 22fe0eb13c3441b71b60aaea0e7fe289a29783da)

Co-authored-by: Terry Jan Reedy <tjreedy at udel.edu>

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