]> granicus.if.org Git - python/commitdiff
[3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463)
authorNed Deily <nad@python.org>
Sat, 4 Mar 2017 11:19:05 +0000 (06:19 -0500)
committerGitHub <noreply@github.com>
Sat, 4 Mar 2017 11:19:05 +0000 (06:19 -0500)
Skip some tests of select.poll when running on macOS due to unresolved
issues with the underlying system poll function on some macOS versions.

(cherry picked from commit de04644627f82d9dc48b3423def7ff5b4aa1926a)

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 debadc1e54c14108f32dfd4948152fdb0dddea8b..9aee4974344e1069f276c44402c5b93a530c6dd3 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -261,6 +261,10 @@ Documentation
 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