diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-12-31 17:03:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-31 08:03:05 -0800 |
commit | 26e293f9b58031ec8a3b87c929bd0cdc2d4b5c7f (patch) | |
tree | 70d83192e8d615cc11e96011136d2d4baf9daf54 | |
parent | bfba43c4a8a3349f82651bfcfae64c40ae07a540 (diff) | |
download | tox-git-26e293f9b58031ec8a3b87c929bd0cdc2d4b5c7f.tar.gz |
Skip time-machine dep and spinner tests on PyPy (#2797)
The time-machine package is deeply relying on CPython implementation
details and causes segfaults on PyPy. Pull the dependency in only
on implementations other than PyPy, and skip collecting the spinner
tests on PyPy since they require it.
-rw-r--r-- | docs/changelog/2797.misc.rst | 2 | ||||
-rw-r--r-- | pyproject.toml | 2 | ||||
-rw-r--r-- | tests/conftest.py | 6 |
3 files changed, 9 insertions, 1 deletions
diff --git a/docs/changelog/2797.misc.rst b/docs/changelog/2797.misc.rst new file mode 100644 index 00000000..dc2a9e04 --- /dev/null +++ b/docs/changelog/2797.misc.rst @@ -0,0 +1,2 @@ +Skip the ``time-machine`` dependency and spinner tests on PyPy because +it segfaults on this implementation. diff --git a/pyproject.toml b/pyproject.toml index 4e2a44b2..e4735d3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,7 +59,7 @@ optional-dependencies.testing = [ "pytest-mock>=3.10", "pytest-xdist>=3.1", "re-assert>=1.1", - "time-machine>=2.8.2", + "time-machine>=2.8.2; implementation_name != \"pypy\"", ] scripts.tox = "tox.run:run" dynamic = ["version"] diff --git a/tests/conftest.py b/tests/conftest.py index 81c4a493..b3086268 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -39,6 +39,12 @@ else: # pragma: no cover (<py38) from typing_extensions import Protocol +collect_ignore = [] +if sys.implementation.name == "pypy": + # time-machine causes segfaults on PyPy + collect_ignore.append("util/test_spinner.py") + + class ToxIniCreator(Protocol): def __call__(self, conf: str, override: Sequence[Override] | None = None) -> Config: # noqa: U100 ... |