]> granicus.if.org Git - python/commitdiff
[3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463)...
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 3 May 2017 10:04:57 +0000 (12:04 +0200)
committerGitHub <noreply@github.com>
Wed, 3 May 2017 10:04:57 +0000 (12:04 +0200)
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)
(cherry picked from commit 1d391f926b37484b8d4b326003a72c0084db19ec)

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

index e3f1aa519e0fe93d4b5e1ca4b7561391acb1e198..81b6277a0401ff9748255c1f56836c5e4e3957b9 100644 (file)
@@ -424,6 +424,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 38579168cfd47ddb80db1a8bcb2cf77b54a2bbe8..18f1ea23fae8cc44dcf144d57b3fbdf8bd5826f3 100644 (file)
@@ -656,6 +656,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 c428d77f17b754328c5ab2bc6ead7eecbd33c794..c7d273c2414d21b602643099487c8d00a4ee5779 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -201,6 +201,10 @@ Build
 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.
+
 - bpo-30197: Enhanced functions swap_attr() and swap_item() in the
   test.support module.  They now work when delete replaced attribute or item
   inside the with statement.  The old value of the attribute or item (or None