forked from pool/python-pytest-xdist
- Add patch support-pytest-9.patch #1
@@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed Nov 26 01:32:36 UTC 2025 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
- Add patch support-pytest-9.patch:
|
||||||
|
* Support Pytest 9 changes.
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 17 19:35:11 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
Thu Jul 17 19:35:11 UTC 2025 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
|||||||
@@ -24,6 +24,8 @@ Summary: Distributed testing and loop-on-failing for py.test
|
|||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/pytest-dev/pytest-xdist
|
URL: https://github.com/pytest-dev/pytest-xdist
|
||||||
Source0: https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest_xdist-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/p/pytest-xdist/pytest_xdist-%{version}.tar.gz
|
||||||
|
# PATCH-FIX-UPSTREAM gh#pytest-dev/pytest-xdist#1266 & gh#pytest-dev/pytest-xdist#1272
|
||||||
|
Patch0: support-pytest-9.patch
|
||||||
BuildRequires: %{python_module base >= 3.7}
|
BuildRequires: %{python_module base >= 3.7}
|
||||||
BuildRequires: %{python_module execnet >= 1.1}
|
BuildRequires: %{python_module execnet >= 1.1}
|
||||||
BuildRequires: %{python_module filelock}
|
BuildRequires: %{python_module filelock}
|
||||||
@@ -83,6 +85,6 @@ sed -i 's/\r//' README.rst
|
|||||||
%doc CHANGELOG.rst README.rst
|
%doc CHANGELOG.rst README.rst
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%{python_sitelib}/xdist
|
%{python_sitelib}/xdist
|
||||||
%{python_sitelib}/pytest_xdist-%{version}*-info
|
%{python_sitelib}/pytest_xdist-%{version}.dist-info
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
|||||||
83
support-pytest-9.patch
Normal file
83
support-pytest-9.patch
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
From 9c0a03f70b7be0a9a7d4b7d3e1692b77027f323e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bruno Oliveira <nicoddemus@gmail.com>
|
||||||
|
Date: Sat, 1 Nov 2025 20:10:43 -0300
|
||||||
|
Subject: [PATCH 1/2] Update build-and-inspect-python-package to v2.14
|
||||||
|
|
||||||
|
v2.13 was breaking in a few CI builds.
|
||||||
|
---
|
||||||
|
.github/workflows/deploy.yml | 2 +-
|
||||||
|
.github/workflows/test.yml | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
Index: pytest_xdist-3.8.0/.github/workflows/deploy.yml
|
||||||
|
===================================================================
|
||||||
|
--- pytest_xdist-3.8.0.orig/.github/workflows/deploy.yml
|
||||||
|
+++ pytest_xdist-3.8.0/.github/workflows/deploy.yml
|
||||||
|
@@ -19,7 +19,7 @@ jobs:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Build and Check Package
|
||||||
|
- uses: hynek/build-and-inspect-python-package@v2.13
|
||||||
|
+ uses: hynek/build-and-inspect-python-package@v2.14
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
needs: package
|
||||||
|
Index: pytest_xdist-3.8.0/.github/workflows/test.yml
|
||||||
|
===================================================================
|
||||||
|
--- pytest_xdist-3.8.0.orig/.github/workflows/test.yml
|
||||||
|
+++ pytest_xdist-3.8.0/.github/workflows/test.yml
|
||||||
|
@@ -22,7 +22,7 @@ jobs:
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- name: Build and Check Package
|
||||||
|
- uses: hynek/build-and-inspect-python-package@v2.13
|
||||||
|
+ uses: hynek/build-and-inspect-python-package@v2.14
|
||||||
|
|
||||||
|
test:
|
||||||
|
|
||||||
|
Index: pytest_xdist-3.8.0/testing/test_newhooks.py
|
||||||
|
===================================================================
|
||||||
|
--- pytest_xdist-3.8.0.orig/testing/test_newhooks.py
|
||||||
|
+++ pytest_xdist-3.8.0/testing/test_newhooks.py
|
||||||
|
@@ -115,7 +115,7 @@ class TestCrashItem:
|
||||||
|
res.stdout.fnmatch_lines_random(["*HOOK: pytest_handlecrashitem"])
|
||||||
|
res.stdout.fnmatch_lines(
|
||||||
|
[
|
||||||
|
- "FAILED test_handlecrashitem_one.py::test_b",
|
||||||
|
- "FAILED test_handlecrashitem_one.py::test_b",
|
||||||
|
+ "FAILED test_handlecrashitem_one.py::test_b*",
|
||||||
|
+ "FAILED test_handlecrashitem_one.py::test_b*",
|
||||||
|
]
|
||||||
|
)
|
||||||
|
Index: pytest_xdist-3.8.0/testing/test_remote.py
|
||||||
|
===================================================================
|
||||||
|
--- pytest_xdist-3.8.0.orig/testing/test_remote.py
|
||||||
|
+++ pytest_xdist-3.8.0/testing/test_remote.py
|
||||||
|
@@ -378,6 +378,11 @@ def test_remote_mainargv(pytester: pytes
|
||||||
|
|
||||||
|
|
||||||
|
def test_remote_usage_prog(pytester: pytest.Pytester) -> None:
|
||||||
|
+ if pytest.version_tuple[:2] >= (9, 0):
|
||||||
|
+ get_optparser_expr = "get_config_parser.optparser"
|
||||||
|
+ else:
|
||||||
|
+ get_optparser_expr = "get_config_parser._getparser()"
|
||||||
|
+
|
||||||
|
pytester.makeconftest(
|
||||||
|
"""
|
||||||
|
import pytest
|
||||||
|
@@ -394,12 +399,12 @@ def test_remote_usage_prog(pytester: pyt
|
||||||
|
"""
|
||||||
|
)
|
||||||
|
pytester.makepyfile(
|
||||||
|
- """
|
||||||
|
+ f"""
|
||||||
|
import sys
|
||||||
|
|
||||||
|
def test(get_config_parser, request):
|
||||||
|
- get_config_parser._getparser().error("my_usage_error")
|
||||||
|
- """
|
||||||
|
+ {get_optparser_expr}.error("my_usage_error")
|
||||||
|
+ """
|
||||||
|
)
|
||||||
|
|
||||||
|
result = pytester.runpytest_subprocess("-n1")
|
||||||
Reference in New Issue
Block a user