summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-08-31 19:21:28 (GMT)
committerGitHub <noreply@github.com>2021-08-31 19:21:28 (GMT)
commit0f274cb2d78f71073e9d7295df3b9006e7bf1097 (patch)
tree04e4640d971fae9f0dff088039c6acc6fd8d07a8
parentebbd0ac5d8850a1630090c210b2454b4b26c7daa (diff)
downloadcpython-0f274cb2d78f71073e9d7295df3b9006e7bf1097.zip
cpython-0f274cb2d78f71073e9d7295df3b9006e7bf1097.tar.gz
cpython-0f274cb2d78f71073e9d7295df3b9006e7bf1097.tar.bz2
bpo-45059: Add module cleanup to IDLE test_macosx (GH-28102)
(cherry picked from commit 22fe0eb13c3441b71b60aaea0e7fe289a29783da) Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
-rw-r--r--Lib/idlelib/idle_test/test_macosx.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/idlelib/idle_test/test_macosx.py b/Lib/idlelib/idle_test/test_macosx.py
index 1932477..86da884 100644
--- a/Lib/idlelib/idle_test/test_macosx.py
+++ b/Lib/idlelib/idle_test/test_macosx.py
@@ -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."