Accepting request 941699 from devel:languages:python:pytest
- Using URLs for Patches looks like a great idea, but it is too unstable. Please, don't. - Add pytest-pr8664-py3.10-test_trial_error-fail.patch * gh#pytest-dev/pytest#8664 - Add pytest-pr9417-py3.10.1-fail.patch * gh#pytest-dev/pytest#9417 - Disable libalternatives usage until all python-pytest* packages are on the same page (see sr#926611) - Disable all update-alternatives install calls if libalternatives is used. - Use libalternatives instead of update-alternatives. OBS-URL: https://build.opensuse.org/request/show/941699 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pytest?expand=0&rev=67
This commit is contained in:
commit
a50f2dc8b4
25
pytest-pr8664-py3.10-test_trial_error-fail.patch
Normal file
25
pytest-pr8664-py3.10-test_trial_error-fail.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 51293de324fc04e778c753a0fd66cb10fe05bf14 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
|
||||
Date: Wed, 12 May 2021 13:30:46 +0200
|
||||
Subject: [PATCH] Ignore DeprecationWarnings in test_trial_error
|
||||
|
||||
Fixes https://github.com/pytest-dev/pytest/issues/8663
|
||||
---
|
||||
testing/test_unittest.py | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: pytest-6.2.5/testing/test_unittest.py
|
||||
===================================================================
|
||||
--- pytest-6.2.5.orig/testing/test_unittest.py
|
||||
+++ pytest-6.2.5/testing/test_unittest.py
|
||||
@@ -533,7 +533,9 @@ class TestTrialUnittest:
|
||||
# will crash both at test time and at teardown
|
||||
"""
|
||||
)
|
||||
- result = testdir.runpytest("-vv", "-oconsole_output_style=classic")
|
||||
+ result = testdir.runpytest(
|
||||
+ "-vv", "-oconsole_output_style=classic", "-W", "ignore::DeprecationWarning"
|
||||
+ )
|
||||
result.stdout.fnmatch_lines(
|
||||
[
|
||||
"test_trial_error.py::TC::test_four FAILED",
|
49
pytest-pr9417-py3.10.1-fail.patch
Normal file
49
pytest-pr9417-py3.10.1-fail.patch
Normal file
@ -0,0 +1,49 @@
|
||||
From 913439f5e5691f391e2969b3c8f0a49e50dce43a Mon Sep 17 00:00:00 2001
|
||||
From: Bruno Oliveira <nicoddemus@gmail.com>
|
||||
Date: Thu, 16 Dec 2021 09:07:14 -0300
|
||||
Subject: [PATCH] Fix test_errors_in_xfail_skip_expressions for Python 3.10.1
|
||||
|
||||
Decided to remove the condition altogether as seems reasonable to state
|
||||
that our own test suite requires Python 3.10.1.
|
||||
|
||||
Fix #9413
|
||||
---
|
||||
.github/workflows/main.yml | 4 ++--
|
||||
testing/test_skipping.py | 2 --
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
|
||||
index 92e2dc6be7..bbc48adb49 100644
|
||||
--- a/.github/workflows/main.yml
|
||||
+++ b/.github/workflows/main.yml
|
||||
@@ -78,7 +78,7 @@ jobs:
|
||||
os: windows-latest
|
||||
tox_env: "py39-xdist"
|
||||
- name: "windows-py310"
|
||||
- python: "3.10-dev"
|
||||
+ python: "3.10.1"
|
||||
os: windows-latest
|
||||
tox_env: "py310-xdist"
|
||||
|
||||
@@ -108,7 +108,7 @@ jobs:
|
||||
os: ubuntu-latest
|
||||
tox_env: "py39-xdist"
|
||||
- name: "ubuntu-py310"
|
||||
- python: "3.10-dev"
|
||||
+ python: "3.10.1"
|
||||
os: ubuntu-latest
|
||||
tox_env: "py310-xdist"
|
||||
- name: "ubuntu-pypy3"
|
||||
diff --git a/testing/test_skipping.py b/testing/test_skipping.py
|
||||
index a0b5cddabc..3010943607 100644
|
||||
--- a/testing/test_skipping.py
|
||||
+++ b/testing/test_skipping.py
|
||||
@@ -1143,8 +1143,6 @@ def test_func():
|
||||
pypy_version_info = getattr(sys, "pypy_version_info", None)
|
||||
if pypy_version_info is not None and pypy_version_info < (6,):
|
||||
markline = markline[5:]
|
||||
- elif sys.version_info[:2] >= (3, 10):
|
||||
- markline = markline[11:]
|
||||
elif sys.version_info >= (3, 8) or hasattr(sys, "pypy_version_info"):
|
||||
markline = markline[4:]
|
||||
|
@ -1,3 +1,30 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 20 19:52:39 UTC 2021 - Matej Cepl <mcepl@suse.com>
|
||||
|
||||
- Using URLs for Patches looks like a great idea, but it is too
|
||||
unstable. Please, don't.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Dec 19 14:08:58 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Add pytest-pr8664-py3.10-test_trial_error-fail.patch
|
||||
* gh#pytest-dev/pytest#8664
|
||||
- Add pytest-pr9417-py3.10.1-fail.patch
|
||||
* gh#pytest-dev/pytest#9417
|
||||
- Disable libalternatives usage until all python-pytest* packages
|
||||
are on the same page (see sr#926611)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 20 15:51:17 UTC 2021 - schubi <schubi@localhost>
|
||||
|
||||
- Disable all update-alternatives install calls if libalternatives
|
||||
is used.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 1 06:25:34 UTC 2021 - Stefan Schubert <schubi@suse.de>
|
||||
|
||||
- Use libalternatives instead of update-alternatives.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Sep 14 09:22:10 UTC 2021 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
|
@ -16,6 +16,14 @@
|
||||
#
|
||||
|
||||
|
||||
# https://build.opensuse.org/request/show/926611#comment-1560144
|
||||
%bcond_with pytest_is_ready_for_alts
|
||||
%if 0%{?suse_version} > 1500 && %{with pytest_is_ready_for_alts}
|
||||
%bcond_without libalternatives
|
||||
%else
|
||||
%bcond_with libalternatives
|
||||
%endif
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
@ -33,11 +41,15 @@ Summary: Simple powerful testing with Python
|
||||
License: MIT
|
||||
URL: https://github.com/pytest-dev/pytest
|
||||
Source: https://files.pythonhosted.org/packages/source/p/pytest/pytest-%{version}.tar.gz
|
||||
# PATCH-FIX-UPSTREAM pytest-pr8664-py3.10-test_trial_error-fail.patch -- gh#pytest-dev/pytest#8664
|
||||
Patch0: pytest-pr8664-py3.10-test_trial_error-fail.patch
|
||||
# PATCH-FIX-UPSTREAM pytest-pr9417-py3.10.1-fail.patch -- gh#pytest-dev/pytest#9417
|
||||
Patch1: pytest-pr9417-py3.10.1-fail.patch
|
||||
BuildRequires: %{python_module setuptools >= 42.0}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module toml}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python-rpm-macros >= 20210929
|
||||
Requires: python-attrs >= 19.2.0
|
||||
Requires: python-importlib-metadata >= 0.12
|
||||
Requires: python-iniconfig
|
||||
@ -47,8 +59,13 @@ Requires: python-py >= 1.8.2
|
||||
Requires: python-setuptools
|
||||
Requires: python-toml
|
||||
Requires: python-wcwidth
|
||||
%if %{with libalternatives}
|
||||
Requires: alts
|
||||
BuildRequires: alts
|
||||
%else
|
||||
Requires(post): update-alternatives
|
||||
Requires(postun):update-alternatives
|
||||
%endif
|
||||
Obsoletes: python-pytest-doc
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
@ -78,7 +95,7 @@ The pytest framework makes it easy to write small tests, yet scales to support
|
||||
complex functional testing for applications and libraries.
|
||||
|
||||
%prep
|
||||
%setup -q -n pytest-%{version}
|
||||
%autosetup -p1 -n pytest-%{version}
|
||||
# fix gh#pytest-dev/pytest#7891 still happening for Leap
|
||||
sed -i '/^\[metadata\]/ a version = %{version}' setup.cfg
|
||||
|
||||
@ -99,7 +116,13 @@ sed -i '/^\[metadata\]/ a version = %{version}' setup.cfg
|
||||
%endif
|
||||
|
||||
%if ! %{with test}
|
||||
|
||||
%pre
|
||||
# If libalternatives is used: Removing old update-alternatives entries.
|
||||
%python_libalternatives_reset_alternative pytest
|
||||
|
||||
%post
|
||||
%if ! %{with libalternatives}
|
||||
# py.test was the master until Oct 2020. boo#1178547
|
||||
alternatives=$(update-alternatives --quiet --list py.test 2> /dev/null) && (
|
||||
update-alternatives --remove-all py.test
|
||||
@ -113,6 +136,7 @@ alternatives=$(update-alternatives --quiet --list py.test 2> /dev/null) && (
|
||||
fi
|
||||
done
|
||||
) ||:
|
||||
%endif
|
||||
%python_install_alternative pytest py.test
|
||||
|
||||
%postun
|
||||
|
Loading…
Reference in New Issue
Block a user