@@ -519,10 +519,14 @@ def handler(signum, frame):
519519 else:
520520 write.setblocking(False)
521521
522- # Start with large chunk size to reduce the
523- # number of send needed to fill the buffer.
524522 written = 0
525- for chunk_size in (2 ** 16, 2 ** 8, 1):
523+ if sys.platform == "vxworks":
524+ CHUNK_SIZES = (1,)
525+ else:
526+ # Start with large chunk size to reduce the
527+ # number of send needed to fill the buffer.
528+ CHUNK_SIZES = (2 ** 16, 2 ** 8, 1)
529+ for chunk_size in CHUNK_SIZES:
526530 chunk = b"x" * chunk_size
527531 try:
528532 while True:
@@ -595,6 +599,7 @@ def handler(signum, frame):
595599
596600
597601@unittest .skipIf (sys .platform == "win32" , "Not valid on Windows" )
602+ @unittest .skipUnless (hasattr (signal , 'siginterrupt' ), "needs signal.siginterrupt()" )
598603class SiginterruptTest (unittest .TestCase ):
599604
600605 def readpipe_interrupted (self , interrupt ):
@@ -680,6 +685,8 @@ def test_siginterrupt_off(self):
680685
681686
682687@unittest .skipIf (sys .platform == "win32" , "Not valid on Windows" )
688+ @unittest .skipUnless (hasattr (signal , 'getitimer' ) and hasattr (signal , 'setitimer' ),
689+ "needs signal.getitimer() and signal.setitimer()" )
683690class ItimerTest (unittest .TestCase ):
684691 def setUp (self ):
685692 self .hndl_called = False
0 commit comments