diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2023-11-19 06:53:37 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-19 06:53:37 (GMT) |
commit | 89c51808398c2f4e199c7c61404ea2113f6890e9 (patch) | |
tree | 7f7ccace7b4f6ff700a2f0ffc1ceda2c786206f3 | |
parent | a62dcacc6e7fabc82c50dd942a838cd69d2846bd (diff) | |
download | cpython-89c51808398c2f4e199c7c61404ea2113f6890e9.zip cpython-89c51808398c2f4e199c7c61404ea2113f6890e9.tar.gz cpython-89c51808398c2f4e199c7c61404ea2113f6890e9.tar.bz2 |
[3.12] IDLE: Fix test_debugger bug and buildbot failures (GH-112258) (#112259)
IDLE: Fix test_debugger bug and buildbot failures (GH-112258)
Missing "requires('gui')" causes Tk() to fail when no gui.
This caused CI Hypothesis test to fail, but I did not understand
the its error message. Then buildbots failed.
IdbTest failed on draft Bdb replacement because so different.
Simplified version works on old and new.
(cherry picked from commit 14fd86a59d0d91fe72641efeb14a59d99127dec3)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
-rw-r--r-- | Lib/idlelib/idle_test/test_debugger.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/idlelib/idle_test/test_debugger.py b/Lib/idlelib/idle_test/test_debugger.py index db01a89..d1c9638 100644 --- a/Lib/idlelib/idle_test/test_debugger.py +++ b/Lib/idlelib/idle_test/test_debugger.py @@ -1,4 +1,7 @@ -"Test debugger, coverage 19%" +"""Test debugger, coverage 66% + +Try to make tests pass with draft bdbx, which may replace bdb in 3.13+. +""" from idlelib import debugger from collections import namedtuple @@ -44,10 +47,8 @@ class IdbTest(unittest.TestCase): cls.msg = 'file.py:2: <module>()' def test_init(self): - # Test that Idb.__init_ calls Bdb.__init__. - idb = debugger.Idb(None) - self.assertIsNone(idb.gui) - self.assertTrue(hasattr(idb, 'breaks')) + self.assertIs(self.idb.gui, self.gui) + # Won't test super call since two Bdbs are very different. def test_user_line(self): # Test that .user_line() creates a string message for a frame. @@ -279,6 +280,7 @@ class NameSpaceTest(unittest.TestCase): @classmethod def setUpClass(cls): + requires('gui') cls.root = Tk() cls.root.withdraw() |