[3.12] gh-71339: Use new assertion methods in test_idle (GH-129314) (#129315)

Revise 10 tests in 7 files, with 1 test split into 2.
(cherry picked from commit 1499f66c4c)
Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>
This commit is contained in:
Miss Islington (bot) 2025-01-26 11:33:44 +01:00 committed by GitHub
parent 53204a11f1
commit 0d53d7afd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 28 additions and 22 deletions

View file

@ -9,6 +9,7 @@ from textwrap import dedent
from tkinter import Tk
from test.support import requires
from test.support.testcase import ExtraAssertions
import unittest
from unittest import mock
from unittest.mock import Mock, patch
@ -227,7 +228,7 @@ class DebuggerGuiTest(unittest.TestCase):
self.idb.get_stack.assert_called_once_with(test_frame, None)
class StackViewerTest(unittest.TestCase):
class StackViewerTest(unittest.TestCase, ExtraAssertions):
@classmethod
def setUpClass(cls):
@ -256,7 +257,7 @@ class StackViewerTest(unittest.TestCase):
flist = None
master_window = self.root
sv = debugger.StackViewer(master_window, flist, gui)
self.assertTrue(hasattr(sv, 'stack'))
self.assertHasAttr(sv, 'stack')
def test_load_stack(self):
# Test the .load_stack() method against a fixed test stack.