]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102)
authorTerry Jan Reedy <tjreedy@udel.edu>
Tue, 31 Aug 2021 18:59:35 +0000 (14:59 -0400)
committerGitHub <noreply@github.com>
Tue, 31 Aug 2021 18:59:35 +0000 (14:59 -0400)
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."