File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 6
6
import sys
7
7
import tempfile
8
8
import unittest
9
- from test .support import os_helper
9
+ from test .support import os_helper , requires_resource
10
10
11
11
if sys .platform != 'win32' :
12
12
raise unittest .SkipTest ("test only relevant on win32" )
@@ -150,6 +150,7 @@ def assertStdinRoundTrip(self, text):
150
150
sys .stdin = old_stdin
151
151
self .assertEqual (actual , text )
152
152
153
+ @requires_resource ('console' )
153
154
def test_input (self ):
154
155
# ASCII
155
156
self .assertStdinRoundTrip ('abc123' )
@@ -164,6 +165,7 @@ def test_input_nonbmp(self):
164
165
# Non-BMP
165
166
self .assertStdinRoundTrip ('\U00100000 \U0010ffff \U0010fffd ' )
166
167
168
+ @requires_resource ('console' )
167
169
def test_partial_reads (self ):
168
170
# Test that reading less than 1 full character works when stdin
169
171
# contains multibyte UTF-8 sequences
@@ -199,6 +201,7 @@ def test_partial_surrogate_reads(self):
199
201
200
202
self .assertEqual (actual , expected , 'stdin.read({})' .format (read_count ))
201
203
204
+ @requires_resource ('console' )
202
205
def test_ctrl_z (self ):
203
206
with open ('CONIN$' , 'rb' , buffering = 0 ) as stdin :
204
207
source = '\xC4 \x1A \r \n ' .encode ('utf-16-le' )
You can’t perform that action at this time.
0 commit comments