Skip to content

Commit

Permalink
Attempt to workaround yet another problem with PyPy tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abravalheri committed Feb 18, 2022
1 parent 19bfd4d commit 951e57e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions setuptools/tests/test_build_meta.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys
import shutil
import signal
import tarfile
Expand All @@ -14,6 +15,7 @@


TIMEOUT = int(os.getenv("TIMEOUT_BACKEND_TEST", "180")) # in seconds
IS_PYPY = '__pypy__' in sys.builtin_module_names


class BuildBackendBase:
Expand Down Expand Up @@ -44,6 +46,10 @@ def method(*args, **kw):
self.pool.shutdown(wait=False) # doesn't stop already running processes
self._kill(pid)
pytest.xfail(f"Backend did not respond before timeout ({TIMEOUT} s)")
except (futures.process.BrokenProcessPool, MemoryError):
if IS_PYPY:
pytest.xfail("PyPy frequently fails tests with ProcessPoolExector")
raise

return method

Expand Down

0 comments on commit 951e57e

Please sign in to comment.