]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 31 Aug 2021 19:24:48 +0000 (12:24 -0700)
committerGitHub <noreply@github.com>
Tue, 31 Aug 2021 19:24:48 +0000 (12:24 -0700)
(cherry picked from commit 22fe0eb13c3441b71b60aaea0e7fe289a29783da)

Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
Lib/idlelib/idle_test/test_macosx.py

index 1932477358689639281f1866b78713e30d75942e..86da8849e5ca00f55affd806b4b89e74f55fdcb5 100644 (file)
@@ -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."