Skip to content

Commit

Permalink
skip multiprocess tests on osx
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 23, 2024
1 parent 2e40334 commit 6d747e9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
10 changes: 5 additions & 5 deletions pyftpdlib/ioloop.py
Original file line number Diff line number Diff line change
Expand Up @@ -671,11 +671,11 @@ def close(self):

# ===================================================================
# --- kqueue() - BSD / OSX
# XXX: disabled as it got broke at some point
# ===================================================================

# if hasattr(select, 'kqueue'): # pragma: no cover
if False: # noqa
# XXX: disabled as it got broken at some point
'''
if hasattr(select, 'kqueue'): # pragma: no cover
class Kqueue(_IOLoop):
"""kqueue() based poller."""
Expand Down Expand Up @@ -788,6 +788,7 @@ def poll(
_write(inst)
if kevent.flags & _ERROR:
inst.handle_close()
'''


# ===================================================================
Expand All @@ -797,8 +798,7 @@ def poll(
if hasattr(select, 'epoll'): # epoll() - Linux
IOLoop = Epoll
# elif hasattr(select, 'kqueue'): # kqueue() - BSD / OSX
if False: # XXX: disabled as it got broken
IOLoop = Kqueue
# IOLoop = Kqueue
elif hasattr(select, 'devpoll'): # /dev/poll - Solaris
IOLoop = DevPoll
elif hasattr(select, 'poll'): # poll() - POSIX
Expand Down
3 changes: 2 additions & 1 deletion pyftpdlib/test/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,8 @@ def stop(self):
assert_free_resources(self.parent_pid)


if POSIX:
# XXX: multiprocessing does not work on OSX on GHA
if POSIX and not (OSX and GITHUB_ACTIONS):

class MProcessTestFTPd(multiprocessing.Process):
"""Same as above but using a sub process instead."""
Expand Down
4 changes: 4 additions & 0 deletions pyftpdlib/test/test_servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
from pyftpdlib import handlers
from pyftpdlib import servers
from pyftpdlib._compat import super
from pyftpdlib.test import GITHUB_ACTIONS
from pyftpdlib.test import GLOBAL_TIMEOUT
from pyftpdlib.test import HOST
from pyftpdlib.test import OSX
from pyftpdlib.test import PASSWD
from pyftpdlib.test import USER
from pyftpdlib.test import WINDOWS
Expand All @@ -33,6 +35,8 @@


MPROCESS_SUPPORT = hasattr(servers, 'MultiprocessFTPServer')
if OSX and GITHUB_ACTIONS:
MPROCESS_SUPPORT = False # it's just broken


class TestFTPServer(PyftpdlibTestCase):
Expand Down

0 comments on commit 6d747e9

Please sign in to comment.