[3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on m… · python/cpython@23b312b

Commit 23b312b

[3.6] bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS (#463) (#1424)

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) (cherry picked from commit 1d391f9)

File tree

3 files changed

lines changed

3 files changed

lines changed

Lines changed: 2 additions & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -424,6 +424,8 @@ def test_select(self):

424424

self.stop_alarm()

425425

self.assertGreaterEqual(dt, self.sleep_time)

426426
427+

@unittest.skipIf(sys.platform == "darwin",

428+

"poll may fail on macOS; see issue #28087")

427429

@unittest.skipUnless(hasattr(select, 'poll'), 'need select.poll')

428430

def test_poll(self):

429431

poller = select.poll()

Lines changed: 3 additions & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -656,6 +656,9 @@ def test_handle_expt(self):

656656

if HAS_UNIX_SOCKETS and self.family == socket.AF_UNIX:

657657

self.skipTest("Not applicable to AF_UNIX sockets.")

658658
659+

if sys.platform == "darwin" and self.use_poll:

660+

self.skipTest("poll may fail on macOS; see issue #28087")

661+
659662

class TestClient(BaseClient):

660663

def handle_expt(self):

661664

self.socket.recv(1024, socket.MSG_OOB)

Lines changed: 4 additions & 0 deletions

Original file line numberDiff line numberDiff line change

@@ -201,6 +201,10 @@ Build

201201

Tests

202202

-----

203203
204+

- bpo-28087: Skip test_asyncore and test_eintr poll failures on macOS.

205+

Skip some tests of select.poll when running on macOS due to unresolved

206+

issues with the underlying system poll function on some macOS versions.

207+
204208

- bpo-30197: Enhanced functions swap_attr() and swap_item() in the

205209

test.support module. They now work when delete replaced attribute or item

206210

inside the with statement. The old value of the attribute or item (or None

0 commit comments