Skip to content

Commit 730f8bc

Browse files
Apply suggestions from code review
Co-authored-by: Bénédikt Tran <[email protected]>
1 parent b2e44fc commit 730f8bc

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Lib/test/test_getpass.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,7 @@ def test_handles_ctrl_c(self):
202202
# Simulate typing 'a' then Ctrl+C (ASCII value 3)
203203
getch.side_effect = [b'a', b'\x03']
204204
# Verify that KeyboardInterrupt is raised
205-
with self.assertRaises(KeyboardInterrupt):
206-
getpass.win_getpass()
205+
self.assertRaises(KeyboardInterrupt, getpass.win_getpass)
207206

208207
def test_flushes_stream_after_input(self):
209208
with mock.patch('msvcrt.getch') as getch:

0 commit comments

Comments
 (0)