Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 14fd86a

Browse filesBrowse files
authored
IDLE: Fix test_debugger bug and buildbot failures (#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.
1 parent adedcfa commit 14fd86a
Copy full SHA for 14fd86a

File tree

1 file changed

+7
-5
lines changed
Filter options

1 file changed

+7
-5
lines changed

‎Lib/idlelib/idle_test/test_debugger.py

Copy file name to clipboardExpand all lines: Lib/idlelib/idle_test/test_debugger.py
+7-5Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
"Test debugger, coverage 19%"
1+
"""Test debugger, coverage 66%
2+
3+
Try to make tests pass with draft bdbx, which may replace bdb in 3.13+.
4+
"""
25

36
from idlelib import debugger
47
from collections import namedtuple
@@ -44,10 +47,8 @@ def setUpClass(cls):
4447
cls.msg = 'file.py:2: <module>()'
4548

4649
def test_init(self):
47-
# Test that Idb.__init_ calls Bdb.__init__.
48-
idb = debugger.Idb(None)
49-
self.assertIsNone(idb.gui)
50-
self.assertTrue(hasattr(idb, 'breaks'))
50+
self.assertIs(self.idb.gui, self.gui)
51+
# Won't test super call since two Bdbs are very different.
5152

5253
def test_user_line(self):
5354
# Test that .user_line() creates a string message for a frame.
@@ -279,6 +280,7 @@ class NameSpaceTest(unittest.TestCase):
279280

280281
@classmethod
281282
def setUpClass(cls):
283+
requires('gui')
282284
cls.root = Tk()
283285
cls.root.withdraw()
284286

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.