diff --git a/py311.patch b/py311.patch index cf59107..b775b58 100644 --- a/py311.patch +++ b/py311.patch @@ -1,17 +1,3 @@ -From b2f624afd68a3090f20187a46284904dd4baa4f6 Mon Sep 17 00:00:00 2001 -From: Daniel Garcia Moreno -Date: Tue, 17 Jan 2023 13:14:42 +0100 -Subject: [PATCH] Python 3.11 compatibility - -This patch adds the new arguments to the types.CodeType class -constructor in the clonefunc function. - -See https://github.com/ionelmc/pytest-benchmark/issues/231 ---- - src/pytest_benchmark/compat.py | 1 + - src/pytest_benchmark/utils.py | 6 +++++- - 2 files changed, 6 insertions(+), 1 deletion(-) - diff --git a/src/pytest_benchmark/compat.py b/src/pytest_benchmark/compat.py index 63d01bd..9afecf2 100644 --- a/src/pytest_benchmark/compat.py @@ -25,7 +11,7 @@ diff --git a/src/pytest_benchmark/utils.py b/src/pytest_benchmark/utils.py index c80352a..e28c04e 100644 --- a/src/pytest_benchmark/utils.py +++ b/src/pytest_benchmark/utils.py -@@ -26,7 +26,7 @@ from urllib.parse import urlparse +@@ -26,7 +26,7 @@ import genericpath @@ -45,6 +31,15 @@ index c80352a..e28c04e 100644 co2 = types.CodeType(*args) # # then, we clone the function itself, using the new co2 --- -2.39.0 - +diff --git a/tests/test_benchmark.py b/tests/test_benchmark.py +index 280ce24..964787f 100644 +--- a/tests/test_benchmark.py ++++ b/tests/test_benchmark.py +@@ -952,7 +952,6 @@ def result(): + + " def test_bad(benchmark):", + "? @benchmark", +- "? def result():", + + "test_abort_broken.py:*", + "_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _*", diff --git a/python-pytest-benchmark.changes b/python-pytest-benchmark.changes index 004abeb..95d64b3 100644 --- a/python-pytest-benchmark.changes +++ b/python-pytest-benchmark.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Jan 17 13:03:29 UTC 2023 - Daniel Garcia + +- Modify the py311.patch to fix the test_abort_broken test, instead of + disabling. + ------------------------------------------------------------------- Tue Jan 17 12:44:25 UTC 2023 - Daniel Garcia diff --git a/python-pytest-benchmark.spec b/python-pytest-benchmark.spec index 72bfb0f..60d1276 100644 --- a/python-pytest-benchmark.spec +++ b/python-pytest-benchmark.spec @@ -71,9 +71,7 @@ sed -i -e '/test_fast PASSED/d' -e '/test_fast SKIPPED/d' tests/test_benchmark.p %python_clone -a %{buildroot}%{_bindir}/py.test-benchmark %check -# gh#ionelmc/pytest-benchmark#231 -donttest="test_abort_broken" -%pytest tests -k "not $donttest" +%pytest tests %post %{python_install_alternative pytest-benchmark py.test-benchmark}