Files
gentoo/dev-python/setproctitle/files/setproctitle-1.2-pypy3.patch
Michał Górny c8bbade63e dev-python/setproctitle: Bump to 1.2
Signed-off-by: Michał Górny <mgorny@gentoo.org>
2020-11-25 09:37:01 +01:00

47 lines
1.6 KiB
Diff

From b13b7254fa10b4ba461c03b0f1f03858a2368bdc Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
Date: Wed, 25 Nov 2020 09:29:18 +0100
Subject: [PATCH] Fix skipping embedded tests with pypy
Fix skipping embedded tests by using the 'skipif' decorator. The tests
need to be skipped early, as otherwise they error out trying to
initialize pyconfig fixture.
---
tests/setproctitle_test.py | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/tests/setproctitle_test.py b/tests/setproctitle_test.py
index 5d73733..7b679df 100644
--- a/tests/setproctitle_test.py
+++ b/tests/setproctitle_test.py
@@ -340,12 +340,10 @@ print(os.popen("ps -x -o pid,command 2> /dev/null").read())
@pytest.mark.embedded
+@pytest.mark.skipif(IS_PYPY, reason="skip test, pypy")
def test_embedded(pyrun, spt_directory):
"""Check the module works with embedded Python.
"""
- if IS_PYPY:
- pytest.skip("skip test, pypy")
-
if not os.path.exists("/proc/%s/cmdline" % os.getpid()):
pytest.skip("known failure: '/proc/PID/cmdline' not available")
@@ -371,11 +369,9 @@ print(os.popen("ps -x -o pid,command 2> /dev/null").read())
@pytest.mark.embedded
+@pytest.mark.skipif(IS_PYPY, reason="skip test, pypy")
def test_embedded_many_args(pyrun, spt_directory):
"""Check more complex cmdlines are handled in embedded env too."""
- if IS_PYPY:
- pytest.skip("skip test, pypy")
-
if not os.path.exists("/proc/%s/cmdline" % os.getpid()):
pytest.skip("known failure: '/proc/PID/cmdline' not available")
--
2.29.2