File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 66import sys
77import tempfile
88import unittest
9- from test .support import os_helper
9+ from test .support import os_helper , requires_resource
1010
1111if sys .platform != 'win32' :
1212 raise unittest .SkipTest ("test only relevant on win32" )
@@ -140,6 +140,7 @@ def assertStdinRoundTrip(self, text):
140140 sys .stdin = old_stdin
141141 self .assertEqual (actual , text )
142142
143+ @requires_resource ('console' )
143144 def test_input (self ):
144145 # ASCII
145146 self .assertStdinRoundTrip ('abc123' )
@@ -154,6 +155,7 @@ def test_input_nonbmp(self):
154155 # Non-BMP
155156 self .assertStdinRoundTrip ('\U00100000 \U0010ffff \U0010fffd ' )
156157
158+ @requires_resource ('console' )
157159 def test_partial_reads (self ):
158160 # Test that reading less than 1 full character works when stdin
159161 # contains multibyte UTF-8 sequences
@@ -189,6 +191,7 @@ def test_partial_surrogate_reads(self):
189191
190192 self .assertEqual (actual , expected , 'stdin.read({})' .format (read_count ))
191193
194+ @requires_resource ('console' )
192195 def test_ctrl_z (self ):
193196 with open ('CONIN$' , 'rb' , buffering = 0 ) as stdin :
194197 source = '\xC4 \x1A \r \n ' .encode ('utf-16-le' )
You can’t perform that action at this time.
0 commit comments