diff --git a/docs/changelog/2797.misc.rst b/docs/changelog/2797.misc.rst new file mode 100644 index 000000000..dc2a9e04f --- /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 4e2a44b25..e4735d3a1 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 81c4a4938..b3086268d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -39,6 +39,12 @@ def _fmt(msg: str) -> str: 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 ...