mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
fix tsan
This commit is contained in:
parent
9485351140
commit
1788b80305
1 changed files with 3 additions and 1 deletions
|
|
@ -70,7 +70,8 @@ def test_reload_no_file(self):
|
|||
args, kwargs = mock_showinfo.call_args
|
||||
self.assertIn("File Not Found", args[0])
|
||||
|
||||
def test_reload_with_file(self):
|
||||
@patch('idlelib.iomenu.messagebox.showerror')
|
||||
def test_reload_with_file(self, mock_showerror):
|
||||
# Test reload with an actual file
|
||||
io = self.io
|
||||
text = io.editwin.text
|
||||
|
|
@ -90,6 +91,7 @@ def test_reload_with_file(self):
|
|||
self.assertEqual(text.get('1.0', 'end-1c'), original_content)
|
||||
result = io.reload(None)
|
||||
|
||||
mock_showerror.assert_not_called()
|
||||
self.assertEqual(result, "break")
|
||||
self.assertEqual(text.get('1.0', 'end-1c'), modified_content)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue