22
22
from unittest import mock
23
23
import weakref
24
24
25
- if sys .platform != 'win32' :
25
+ if sys .platform not in ( 'win32' , 'vxworks' ) :
26
26
import tty
27
27
28
28
import asyncio
@@ -465,6 +465,8 @@ def my_handler():
465
465
self .assertFalse (self .loop .remove_signal_handler (signal .SIGINT ))
466
466
467
467
@unittest .skipUnless (hasattr (signal , 'SIGALRM' ), 'No SIGALRM' )
468
+ @unittest .skipUnless (hasattr (signal , 'setitimer' ),
469
+ 'need signal.setitimer()' )
468
470
def test_signal_handling_while_selecting (self ):
469
471
# Test with a signal actually arriving during a select() call.
470
472
caught = 0
@@ -482,6 +484,8 @@ def my_handler():
482
484
self .assertEqual (caught , 1 )
483
485
484
486
@unittest .skipUnless (hasattr (signal , 'SIGALRM' ), 'No SIGALRM' )
487
+ @unittest .skipUnless (hasattr (signal , 'setitimer' ),
488
+ 'need signal.setitimer()' )
485
489
def test_signal_handling_args (self ):
486
490
some_args = (42 ,)
487
491
caught = 0
@@ -1371,6 +1375,7 @@ async def connect():
1371
1375
1372
1376
@unittest .skipUnless (sys .platform != 'win32' ,
1373
1377
"Don't support pipes for Windows" )
1378
+ @unittest .skipUnless (hasattr (os , 'openpty' ), 'need os.openpty()' )
1374
1379
def test_read_pty_output (self ):
1375
1380
proto = MyReadPipeProto (loop = self .loop )
1376
1381
@@ -1468,6 +1473,7 @@ def test_write_pipe_disconnect_on_close(self):
1468
1473
1469
1474
@unittest .skipUnless (sys .platform != 'win32' ,
1470
1475
"Don't support pipes for Windows" )
1476
+ @unittest .skipUnless (hasattr (os , 'openpty' ), 'need os.openpty()' )
1471
1477
# select, poll and kqueue don't support character devices (PTY) on Mac OS X
1472
1478
# older than 10.6 (Snow Leopard)
1473
1479
@support .requires_mac_ver (10 , 6 )
@@ -1512,6 +1518,7 @@ def reader(data):
1512
1518
1513
1519
@unittest .skipUnless (sys .platform != 'win32' ,
1514
1520
"Don't support pipes for Windows" )
1521
+ @unittest .skipUnless (hasattr (os , 'openpty' ), 'need os.openpty()' )
1515
1522
# select, poll and kqueue don't support character devices (PTY) on Mac OS X
1516
1523
# older than 10.6 (Snow Leopard)
1517
1524
@support .requires_mac_ver (10 , 6 )
0 commit comments