File tree Expand file tree Collapse file tree 1 file changed +4
-14
lines changed
Expand file tree Collapse file tree 1 file changed +4
-14
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,8 @@ def test_getwch(self):
7575 h = msvcrt .get_osfhandle (stdin .fileno ())
7676 flush_console_input_buffer (h )
7777
78- old_stdin = sys .stdin
79- try :
80- sys .stdin = stdin
81- write_input (stdin , c_encoded )
82- self .assertEqual (msvcrt .getwch (), c )
83- finally :
84- sys .stdin = old_stdin
78+ write_input (stdin , c_encoded )
79+ self .assertEqual (msvcrt .getwch (), c )
8580
8681 def test_getche (self ):
8782 msvcrt .ungetch (b'c' )
@@ -92,13 +87,8 @@ def test_getwche(self):
9287 h = msvcrt .get_osfhandle (stdin .fileno ())
9388 flush_console_input_buffer (h )
9489
95- old_stdin = sys .stdin
96- try :
97- sys .stdin = stdin
98- write_input (stdin , c_encoded )
99- self .assertEqual (msvcrt .getwche (), c )
100- finally :
101- sys .stdin = old_stdin
90+ write_input (stdin , c_encoded )
91+ self .assertEqual (msvcrt .getwche (), c )
10292
10393 def test_putch (self ):
10494 msvcrt .putch (b'c' )
You can’t perform that action at this time.
0 commit comments