Accepting request 941512 from home:bnavigator:python-rpm-macros
- 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) OBS-URL: https://build.opensuse.org/request/show/941512 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:pytest/python-pytest?expand=0&rev=97
This commit is contained in:
parent
79cd4c77bc
commit
bcc528bda1
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(-)
|
||||
|
||||
Index: pytest-6.2.5/.github/workflows/main.yml
|
||||
===================================================================
|
||||
--- pytest-6.2.5.orig/.github/workflows/main.yml
|
||||
+++ pytest-6.2.5/.github/workflows/main.yml
|
||||
@@ -75,7 +75,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"
|
||||
|
||||
@@ -105,7 +105,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"
|
||||
Index: pytest-6.2.5/testing/test_skipping.py
|
||||
===================================================================
|
||||
--- pytest-6.2.5.orig/testing/test_skipping.py
|
||||
+++ pytest-6.2.5/testing/test_skipping.py
|
||||
@@ -1126,8 +1126,6 @@ def test_errors_in_xfail_skip_expression
|
||||
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,13 @@
|
||||
-------------------------------------------------------------------
|
||||
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>
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package python
|
||||
# spec file
|
||||
#
|
||||
# Copyright (c) 2021 SUSE LLC
|
||||
#
|
||||
@ -16,7 +16,9 @@
|
||||
#
|
||||
|
||||
|
||||
%if 0%{?suse_version} > 1500
|
||||
# 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
|
||||
@ -39,6 +41,10 @@ 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: https://github.com/pytest-dev/pytest/pull/9417.patch#/pytest-pr9417-py3.10.1-fail.patch
|
||||
BuildRequires: %{python_module setuptools >= 42.0}
|
||||
BuildRequires: %{python_module setuptools_scm}
|
||||
BuildRequires: %{python_module toml}
|
||||
@ -89,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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user