From 6b5a5031608d8dd1d05873a83101fbc9f345aa7a Mon Sep 17 00:00:00 2001 From: Felix Schwarz Date: Thu, 18 Jul 2024 17:00:16 +0200 Subject: [PATCH] better skip --- tests/queue_runner_test.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/queue_runner_test.py b/tests/queue_runner_test.py index 91269eb..a9f18a1 100644 --- a/tests/queue_runner_test.py +++ b/tests/queue_runner_test.py @@ -28,7 +28,9 @@ def path_maildir(tmpdir): return _path_maildir -@pytest.mark.skipIf(sys.implementation.name == 'pypy', reason='"time-machine" does not work on PyPy') +IS_PYPY3 = (sys.version_info >= (3, 0)) and (sys.implementation.name == 'pypy') + +@pytest.mark.skipIf(IS_PYPY3, reason='"time-machine" does not work on PyPy') # https://github.com/adamchainz/time-machine/issues/305 def test_can_move_stale_messages_back_to_new(path_maildir): mailer = DebugMailer()