xfail test_wait_publishes_periodically() on macOS
A targeted subset of which [happens on both CircleCI and Travis CI](https://github.com/cherrypy/cherrypy/pull/1877/files#r524250775).
"""Publish-subscribe bus tests."""
# pylint: disable=redefined-outer-name
+import os
+import sys
import threading
import time
import unittest.mock
@@ -10,6 +12,7 @@ import pytest
from cherrypy.process import wspbus
+CI_ON_MACOS = bool(os.getenv("CI")) and sys.platform == "darwin"
msg = 'Listener %d on channel %s: %s.' # pylint: disable=invalid-name
@@ -218,6 +221,7 @@ def test_wait(bus):
assert bus.state in states, 'State %r not in %r' % (bus.state, states)
+@pytest.mark.xfail(CI_ON_MACOS, reason="continuous integration on macOS fails")
def test_wait_publishes_periodically(bus):
"""Test that wait publishes each tick."""
callback = unittest.mock.MagicMock()
