@@ -429,6 +429,7 @@ def test_invalid_operations(self):
429429 @unittest .skipIf (
430430 support .is_emscripten , "fstat() of a pipe fd is not supported"
431431 )
432+ @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
432433 def test_optional_abilities (self ):
433434 # Test for OSError when optional APIs are not supported
434435 # The purpose of this test is to try fileno(), reading, writing and
@@ -3970,6 +3971,7 @@ def test_removed_u_mode(self):
39703971 @unittest .skipIf (
39713972 support .is_emscripten , "fstat() of a pipe fd is not supported"
39723973 )
3974+ @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
39733975 def test_open_pipe_with_append (self ):
39743976 # bpo-27805: Ignore ESPIPE from lseek() in open().
39753977 r , w = os .pipe ()
@@ -4108,6 +4110,7 @@ def cleanup_fds():
41084110 with warnings_helper .check_no_resource_warning (self ):
41094111 open (r , * args , closefd = False , ** kwargs )
41104112
4113+ @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
41114114 def test_warn_on_dealloc_fd (self ):
41124115 self ._check_warn_on_dealloc_fd ("rb" , buffering = 0 )
41134116 self ._check_warn_on_dealloc_fd ("rb" )
@@ -4147,6 +4150,7 @@ def test_nonblock_pipe_write_smallbuf(self):
41474150
41484151 @unittest .skipUnless (hasattr (os , 'set_blocking' ),
41494152 'os.set_blocking() required for this test' )
4153+ @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
41504154 def _test_nonblock_pipe_write (self , bufsize ):
41514155 sent = []
41524156 received = []
@@ -4458,14 +4462,17 @@ def _read():
44584462 raise
44594463
44604464 @requires_alarm
4465+ @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
44614466 def test_interrupted_write_unbuffered (self ):
44624467 self .check_interrupted_write (b"xy" , b"xy" , mode = "wb" , buffering = 0 )
44634468
44644469 @requires_alarm
4470+ @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
44654471 def test_interrupted_write_buffered (self ):
44664472 self .check_interrupted_write (b"xy" , b"xy" , mode = "wb" )
44674473
44684474 @requires_alarm
4475+ @unittest .skipUnless (hasattr (os , "pipe" ), "requires os.pipe()" )
44694476 def test_interrupted_write_text (self ):
44704477 self .check_interrupted_write ("xy" , b"xy" , mode = "w" , encoding = "ascii" )
44714478
0 commit comments