mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
[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:
parent
53204a11f1
commit
0d53d7afd5
7 changed files with 28 additions and 22 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue