File tree 1 file changed +4
-14
lines changed
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):
75
75
h = msvcrt .get_osfhandle (stdin .fileno ())
76
76
flush_console_input_buffer (h )
77
77
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 )
85
80
86
81
def test_getche (self ):
87
82
msvcrt .ungetch (b'c' )
@@ -92,13 +87,8 @@ def test_getwche(self):
92
87
h = msvcrt .get_osfhandle (stdin .fileno ())
93
88
flush_console_input_buffer (h )
94
89
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 )
102
92
103
93
def test_putch (self ):
104
94
msvcrt .putch (b'c' )
You can’t perform that action at this time.
0 commit comments