pythonpython-3.xmacos-sierraasyncore

Why do asyncore tests fail in compiled Python 3.6?


I have compiled Python 3.6 and ran tests but 2 of them failed:

======================================================================
FAIL: test_handle_expt (test.test_asyncore.TestAPI_UseIPv4Poll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/andrei/Python/cpython/Lib/test/test_asyncore.py", line 676, in test_handle_expt
    self.loop_waiting_for_flag(client)
  File "/Users/andrei/Python/cpython/Lib/test/test_asyncore.py", line 516, in loop_waiting_for_flag
    self.fail("flag not set")
AssertionError: flag not set

======================================================================
FAIL: test_handle_expt (test.test_asyncore.TestAPI_UseIPv6Poll)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/andrei/Python/cpython/Lib/test/test_asyncore.py", line 676, in test_handle_expt
    self.loop_waiting_for_flag(client)
  File "/Users/andrei/Python/cpython/Lib/test/test_asyncore.py", line 516, in loop_waiting_for_flag
    self.fail("flag not set")
AssertionError: flag not set

----------------------------------------------------------------------
Ran 101 tests in 21.140s

FAILED (failures=2, skipped=6)
test test_asyncore failed

What can go wrong there?


Solution

  • This has been brought up twice on the bug tracker:

    The first was closed as a dupe of the second and the second one has not yet been fixed. In short, the poll() system function is apparently broken in Sierra. You'll need to wait for them to get done fixing it. Until then, it is safe to ignore these failures.