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" )
@@ -140,6 +140,7 @@ def assertStdinRoundTrip(self, text):
140
140
sys .stdin = old_stdin
141
141
self .assertEqual (actual , text )
142
142
143
+ @requires_resource ('console' )
143
144
def test_input (self ):
144
145
# ASCII
145
146
self .assertStdinRoundTrip ('abc123' )
@@ -154,6 +155,7 @@ def test_input_nonbmp(self):
154
155
# Non-BMP
155
156
self .assertStdinRoundTrip ('\U00100000 \U0010ffff \U0010fffd ' )
156
157
158
+ @requires_resource ('console' )
157
159
def test_partial_reads (self ):
158
160
# Test that reading less than 1 full character works when stdin
159
161
# contains multibyte UTF-8 sequences
@@ -189,6 +191,7 @@ def test_partial_surrogate_reads(self):
189
191
190
192
self .assertEqual (actual , expected , 'stdin.read({})' .format (read_count ))
191
193
194
+ @requires_resource ('console' )
192
195
def test_ctrl_z (self ):
193
196
with open ('CONIN$' , 'rb' , buffering = 0 ) as stdin :
194
197
source = '\xC4 \x1A \r \n ' .encode ('utf-16-le' )
You can’t perform that action at this time.
0 commit comments