[Python-checkins] bpo-31904: Skip some asyncio tests on VxWorks (#23815)

asvetlov webhook-mailer at python.org
Thu Dec 17 05:05:02 EST 2020


https://github.com/python/cpython/commit/ba760f3710eccdfae2b680a5f94fe0160ddb1536
commit: ba760f3710eccdfae2b680a5f94fe0160ddb1536
branch: master
author: pxinwr <peixing.xin at windriver.com>
committer: asvetlov <andrew.svetlov at gmail.com>
date: 2020-12-17T12:04:47+02:00
summary:

bpo-31904: Skip some asyncio tests on VxWorks (#23815)

files:
A Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst
M Lib/test/test_asyncio/test_base_events.py
M Lib/test/test_asyncio/test_events.py

diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py
index 8d048c87d0050..e40e7999b64d1 100644
--- a/Lib/test/test_asyncio/test_base_events.py
+++ b/Lib/test/test_asyncio/test_base_events.py
@@ -1745,6 +1745,8 @@ class FakeSock:
             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 ce615606db7e3..6523a79b4a634 100644
--- a/Lib/test/test_asyncio/test_events.py
+++ b/Lib/test/test_asyncio/test_events.py
@@ -22,7 +22,7 @@
 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 @@ def my_handler():
         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 @@ def my_handler():
         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 @@ async def connect():
 
     @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 @@ def test_write_pipe_disconnect_on_close(self):
 
     @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 @@ def reader(data):
 
     @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)
diff --git a/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst b/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst
new file mode 100644
index 0000000000000..d74e4666853b5
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2020-12-17-15-42-44.bpo-31904.d8g3l0d5.rst
@@ -0,0 +1 @@
+Skip some asyncio tests on VxWorks.



More information about the Python-checkins mailing list