Skip to content

Commit ba760f3

Browse files
authored
bpo-31904: Skip some asyncio tests on VxWorks (#23815)
1 parent dcc997c commit ba760f3

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

Lib/test/test_asyncio/test_base_events.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,8 @@ class FakeSock:
17451745
MyDatagramProto, allow_broadcast=True, sock=FakeSock())
17461746
self.assertRaises(ValueError, self.loop.run_until_complete, fut)
17471747

1748+
@unittest.skipIf(sys.platform == 'vxworks',
1749+
"SO_BROADCAST is enabled by default on VxWorks")
17481750
def test_create_datagram_endpoint_sockopts(self):
17491751
# Socket options should not be applied unless asked for.
17501752
# SO_REUSEPORT is not available on all platforms.

Lib/test/test_asyncio/test_events.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
from unittest import mock
2323
import weakref
2424

25-
if sys.platform != 'win32':
25+
if sys.platform not in ('win32', 'vxworks'):
2626
import tty
2727

2828
import asyncio
@@ -465,6 +465,8 @@ def my_handler():
465465
self.assertFalse(self.loop.remove_signal_handler(signal.SIGINT))
466466

467467
@unittest.skipUnless(hasattr(signal, 'SIGALRM'), 'No SIGALRM')
468+
@unittest.skipUnless(hasattr(signal, 'setitimer'),
469+
'need signal.setitimer()')
468470
def test_signal_handling_while_selecting(self):
469471
# Test with a signal actually arriving during a select() call.
470472
caught = 0
@@ -482,6 +484,8 @@ def my_handler():
482484
self.assertEqual(caught, 1)
483485

484486
@unittest.skipUnless(hasattr(signal, 'SIGALRM'), 'No SIGALRM')
487+
@unittest.skipUnless(hasattr(signal, 'setitimer'),
488+
'need signal.setitimer()')
485489
def test_signal_handling_args(self):
486490
some_args = (42,)
487491
caught = 0
@@ -1371,6 +1375,7 @@ async def connect():
13711375

13721376
@unittest.skipUnless(sys.platform != 'win32',
13731377
"Don't support pipes for Windows")
1378+
@unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()')
13741379
def test_read_pty_output(self):
13751380
proto = MyReadPipeProto(loop=self.loop)
13761381

@@ -1468,6 +1473,7 @@ def test_write_pipe_disconnect_on_close(self):
14681473

14691474
@unittest.skipUnless(sys.platform != 'win32',
14701475
"Don't support pipes for Windows")
1476+
@unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()')
14711477
# select, poll and kqueue don't support character devices (PTY) on Mac OS X
14721478
# older than 10.6 (Snow Leopard)
14731479
@support.requires_mac_ver(10, 6)
@@ -1512,6 +1518,7 @@ def reader(data):
15121518

15131519
@unittest.skipUnless(sys.platform != 'win32',
15141520
"Don't support pipes for Windows")
1521+
@unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()')
15151522
# select, poll and kqueue don't support character devices (PTY) on Mac OS X
15161523
# older than 10.6 (Snow Leopard)
15171524
@support.requires_mac_ver(10, 6)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Skip some asyncio tests on VxWorks.

0 commit comments

Comments
 (0)