summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorpxinwr <peixing.xin@windriver.com>2020-12-17 10:04:47 (GMT)
committerGitHub <noreply@github.com>2020-12-17 10:04:47 (GMT)
commitba760f3710eccdfae2b680a5f94fe0160ddb1536 (patch)
tree60b560df57c2510642c786cf8a09fa73ed00cbc8 /Lib
parentdcc997cd28ab33ebac44182ee55533c1b37689f7 (diff)
downloadcpython-ba760f3710eccdfae2b680a5f94fe0160ddb1536.zip
cpython-ba760f3710eccdfae2b680a5f94fe0160ddb1536.tar.gz
cpython-ba760f3710eccdfae2b680a5f94fe0160ddb1536.tar.bz2
bpo-31904: Skip some asyncio tests on VxWorks (#23815)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_asyncio/test_base_events.py2
-rw-r--r--Lib/test/test_asyncio/test_events.py9
2 files changed, 10 insertions, 1 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 8d048c8..e40e799 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1745,6 +1745,8 @@ class BaseEventLoopWithSelectorTests(test_utils.TestCase):
MyDatagramProto, allow_broadcast=True, sock=FakeSock())
self.assertRaises(ValueError, self.loop.run_until_complete, fut)
+ @unittest.skipIf(sys.platform == 'vxworks',
+ "SO_BROADCAST is enabled by default on VxWorks")
def test_create_datagram_endpoint_sockopts(self):
# Socket options should not be applied unless asked for.
# SO_REUSEPORT is not available on all platforms.
diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py
index ce61560..6523a79 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -22,7 +22,7 @@ import unittest
from unittest import mock
import weakref
-if sys.platform != 'win32':
+if sys.platform not in ('win32', 'vxworks'):
import tty
import asyncio
@@ -465,6 +465,8 @@ class EventLoopTestsMixin:
self.assertFalse(self.loop.remove_signal_handler(signal.SIGINT))
@unittest.skipUnless(hasattr(signal, 'SIGALRM'), 'No SIGALRM')
+ @unittest.skipUnless(hasattr(signal, 'setitimer'),
+ 'need signal.setitimer()')
def test_signal_handling_while_selecting(self):
# Test with a signal actually arriving during a select() call.
caught = 0
@@ -482,6 +484,8 @@ class EventLoopTestsMixin:
self.assertEqual(caught, 1)
@unittest.skipUnless(hasattr(signal, 'SIGALRM'), 'No SIGALRM')
+ @unittest.skipUnless(hasattr(signal, 'setitimer'),
+ 'need signal.setitimer()')
def test_signal_handling_args(self):
some_args = (42,)
caught = 0
@@ -1371,6 +1375,7 @@ class EventLoopTestsMixin:
@unittest.skipUnless(sys.platform != 'win32',
"Don't support pipes for Windows")
+ @unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()')
def test_read_pty_output(self):
proto = MyReadPipeProto(loop=self.loop)
@@ -1468,6 +1473,7 @@ class EventLoopTestsMixin:
@unittest.skipUnless(sys.platform != 'win32',
"Don't support pipes for Windows")
+ @unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()')
# select, poll and kqueue don't support character devices (PTY) on Mac OS X
# older than 10.6 (Snow Leopard)
@support.requires_mac_ver(10, 6)
@@ -1512,6 +1518,7 @@ class EventLoopTestsMixin:
@unittest.skipUnless(sys.platform != 'win32',
"Don't support pipes for Windows")
+ @unittest.skipUnless(hasattr(os, 'openpty'), 'need os.openpty()')
# select, poll and kqueue don't support character devices (PTY) on Mac OS X
# older than 10.6 (Snow Leopard)
@support.requires_mac_ver(10, 6)