- Add py311.patch to make it compatible with python 3.11,

gh#ionelmc/pytest-benchmark#232
- Disable broken test_abort_broken, this test is broken because the output of
  the tests is a bit different with python 3.11 so we can disable until it's
  fixed.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest-benchmark?expand=0&rev=23
This commit is contained in:
2023-01-17 12:57:36 +00:00
committed by Git OBS Bridge
parent 5570adb906
commit cf4c34bdbf
3 changed files with 65 additions and 2 deletions

View File

@@ -1,7 +1,7 @@
#
# spec file for package python-pytest-benchmark
#
# Copyright (c) 2022 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,6 +25,8 @@ License: BSD-2-Clause
URL: https://github.com/ionelmc/pytest-benchmark
Source: https://files.pythonhosted.org/packages/source/p/pytest-benchmark/pytest-benchmark-%{version}.tar.gz
Patch0: fix-test-fast.patch
# PATCH-FIX-OPENSUSE py311.patch gh#ionelmc/pytest-benchmark#232
Patch1: py311.patch
BuildRequires: %{python_module aspectlib}
BuildRequires: %{python_module elasticsearch}
BuildRequires: %{python_module freezegun}
@@ -69,7 +71,9 @@ 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
%pytest tests
# gh#ionelmc/pytest-benchmark#231
donttest="test_abort_broken"
%pytest tests -k "not $donttest"
%post
%{python_install_alternative pytest-benchmark py.test-benchmark}