Skip to content

Commit 1d391f9

Browse files
authored
[3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463)
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 de04644)
1 parent 343d483 commit 1d391f9

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Lib/test/eintrdata/eintr_tester.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ def test_select(self):
437437
self.stop_alarm()
438438
self.assertGreaterEqual(dt, self.sleep_time)
439439

440+
@unittest.skipIf(sys.platform == "darwin",
441+
"poll may fail on macOS; see issue #28087")
440442
@unittest.skipUnless(hasattr(select, 'poll'), 'need select.poll')
441443
def test_poll(self):
442444
poller = select.poll()

Lib/test/test_asyncore.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,9 @@ def test_handle_expt(self):
661661
if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX:
662662
self.skipTest("Not applicable to AF_UNIX sockets.")
663663

664+
if sys.platform == "darwin" and self.use_poll:
665+
self.skipTest("poll may fail on macOS; see issue #28087")
666+
664667
class TestClient(BaseClient):
665668
def handle_expt(self):
666669
self.socket.recv(1024, socket.MSG_OOB)

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ Documentation
261261
Tests
262262
-----
263263

264+
- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS.
265+
Skip some tests of select.poll when running on macOS due to unresolved
266+
issues with the underlying system poll function on some macOS versions.
267+
264268
- Issue #29571: to match the behaviour of the ``re.LOCALE`` flag,
265269
test_re.test_locale_flag now uses ``locale.getpreferredencoding(False)`` to
266270
determine the candidate encoding for the test regex (allowing it to correctly

0 commit comments

Comments
 (0)