]> granicus.if.org Git - python/commitdiff
bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS. (#462)
authorNed Deily <nad@python.org>
Sat, 4 Mar 2017 11:00:37 +0000 (06:00 -0500)
committerGitHub <noreply@github.com>
Sat, 4 Mar 2017 11:00:37 +0000 (06:00 -0500)
* bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS

Skip some tests of select.poll when running on macOS due to unresolved
issues with the underlying system poll function on some macOS versions.

Lib/test/eintrdata/eintr_tester.py
Lib/test/test_asyncore.py
Misc/NEWS

index d194e775eaeb8f363084d8310b4a392412415706..c619b3d6c38a599f81972fde715d80aa6f5b2a81 100644 (file)
@@ -437,6 +437,8 @@ class SelectEINTRTest(EINTRBaseTest):
         self.stop_alarm()
         self.assertGreaterEqual(dt, self.sleep_time)
 
+    @unittest.skipIf(sys.platform == "darwin",
+                     "poll may fail on macOS; see issue #28087")
     @unittest.skipUnless(hasattr(select, 'poll'), 'need select.poll')
     def test_poll(self):
         poller = select.poll()
index 51c65737a441de5817a070ff52e9abd18d3bf612..d05462b7efce3582c5d5f8511910eef3d9a637da 100644 (file)
@@ -661,6 +661,9 @@ class BaseTestAPI:
         if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX:
             self.skipTest("Not applicable to AF_UNIX sockets.")
 
+        if sys.platform == "darwin" and self.use_poll:
+            self.skipTest("poll may fail on macOS; see issue #28087")
+
         class TestClient(BaseClient):
             def handle_expt(self):
                 self.socket.recv(1024, socket.MSG_OOB)
index 899723937c84a1fe67676b62b66da38c23af9f89..3ff3cb5b8b65e6db1b23664ffa20ebcb5a7e17e7 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -895,6 +895,10 @@ Tools/Demos
 Tests
 -----
 
+- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS.
+  Skip some tests of select.poll when running on macOS due to unresolved
+  issues with the underlying system poll function on some macOS versions.
+
 - Issue #29571: to match the behaviour of the ``re.LOCALE`` flag,
   test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to
   determine the candidate encoding for the test regex (allowing it to correctly