Patch error collecting tests with pytest-xdist

This commit is contained in:
Benjamin A. Beasley 2023-11-01 10:59:53 -04:00 committed by Nikola Forró
parent c07c356d12
commit b3bae532eb
2 changed files with 42 additions and 1 deletions

28
19443.patch Normal file
View File

@ -0,0 +1,28 @@
From 28413806316049c09bb4b0182f652cce0ba82a50 Mon Sep 17 00:00:00 2001
From: "Benjamin A. Beasley" <code@musicinmybrain.net>
Date: Fri, 27 Oct 2023 16:47:37 -0400
Subject: [PATCH] TST: Fix #19442 minimally
Use a sorted version of the set REAL_DTYPES to parameterize
test_b_orthonormalize.
---
scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py b/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
index c17d37051fca..fd6f166dc62d 100644
--- a/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
+++ b/scipy/sparse/linalg/_eigen/lobpcg/tests/test_lobpcg.py
@@ -101,9 +101,9 @@ def test_MikotaPair():
@pytest.mark.parametrize("n", [50])
@pytest.mark.parametrize("m", [1, 2, 10])
-@pytest.mark.parametrize("Vdtype", REAL_DTYPES)
-@pytest.mark.parametrize("Bdtype", REAL_DTYPES)
-@pytest.mark.parametrize("BVdtype", REAL_DTYPES)
+@pytest.mark.parametrize("Vdtype", sorted(REAL_DTYPES, key=str))
+@pytest.mark.parametrize("Bdtype", sorted(REAL_DTYPES, key=str))
+@pytest.mark.parametrize("BVdtype", sorted(REAL_DTYPES, key=str))
def test_b_orthonormalize(n, m, Vdtype, Bdtype, BVdtype):
"""Test B-orthonormalization by Cholesky with callable 'B'.
The function '_b_orthonormalize' is key in LOBPCG but may

View File

@ -23,7 +23,7 @@
Summary: Scientific Tools for Python
Name: scipy
Version: 1.11.3
Release: 1%{?dist}
Release: 2%{?dist}
# BSD-3-Clause -- whole package except:
# BSD-2-Clause -- scipy/_lib/_pep440.py
@ -48,6 +48,16 @@ License: BSD-3-Clause AND BSD-2-Clause AND MIT AND BSL-1.0 AND Boehm-GC AND Q
Url: http://www.scipy.org/scipylib/index.html
Source0: https://github.com/scipy/scipy/releases/download/v%{version}/scipy-%{version}.tar.gz
# TST: Fix #19442 minimally
# https://github.com/scipy/scipy/pull/19443
#
# Fixes:
#
# BUG: Error collecting tests due to inconsistent parameterization order in
# test_b_orthonormalize
# https://github.com/scipy/scipy/issues/19442
Patch: https://github.com/scipy/scipy/pull/19443.patch
BuildRequires: %{blaslib}-devel
BuildRequires: gcc-gfortran, gcc-c++
@ -292,6 +302,9 @@ popd
%endif
%changelog
* Wed Nov 01 2023 Benjamin A. Beasley <code@musicinmybrain.net> - 1.11.3-2
- Patch error collecting tests with pytest-xdist
* Wed Oct 11 2023 Jerry James <loganjerry@gmail.com> - 1.11.3-1
- New upstream release 1.11.3
resolves: #2211813