Skip to content

Commit 1788b80

Browse files
committed
fix tsan
1 parent 9485351 commit 1788b80

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Lib/idlelib/idle_test/test_iomenu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,8 @@ def test_reload_no_file(self):
7070
args, kwargs = mock_showinfo.call_args
7171
self.assertIn("File Not Found", args[0])
7272

73-
def test_reload_with_file(self):
73+
@patch('idlelib.iomenu.messagebox.showerror')
74+
def test_reload_with_file(self, mock_showerror):
7475
# Test reload with an actual file
7576
io = self.io
7677
text = io.editwin.text
@@ -90,6 +91,7 @@ def test_reload_with_file(self):
9091
self.assertEqual(text.get('1.0', 'end-1c'), original_content)
9192
result = io.reload(None)
9293

94+
mock_showerror.assert_not_called()
9395
self.assertEqual(result, "break")
9496
self.assertEqual(text.get('1.0', 'end-1c'), modified_content)
9597

0 commit comments

Comments
 (0)