1
0

- Add fix-tests-pytest72.patch to fix tests failing with pytest 7.2

gh#matplotlib/matplotlib#24173

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-matplotlib?expand=0&rev=69
This commit is contained in:
Daniel Garcia 2022-12-07 11:31:15 +00:00 committed by Git OBS Bridge
parent 8062773c55
commit 87e7f60d87
3 changed files with 44 additions and 1 deletions

35
fix-tests-pytest72.patch Normal file
View File

@ -0,0 +1,35 @@
Index: matplotlib-3.5.3/lib/matplotlib/tests/test_cbook.py
===================================================================
--- matplotlib-3.5.3.orig/lib/matplotlib/tests/test_cbook.py
+++ matplotlib-3.5.3/lib/matplotlib/tests/test_cbook.py
@@ -52,7 +52,7 @@ class Test_delete_masked_points:
class Test_boxplot_stats:
- def setup(self):
+ def setup_method(self):
np.random.seed(937)
self.nrows = 37
self.ncols = 4
@@ -178,7 +178,7 @@ class Test_boxplot_stats:
class Test_callback_registry:
- def setup(self):
+ def setup_method(self):
self.signal = 'test'
self.callbacks = cbook.CallbackRegistry()
Index: matplotlib-3.5.3/lib/matplotlib/tests/test_mlab.py
===================================================================
--- matplotlib-3.5.3.orig/lib/matplotlib/tests/test_mlab.py
+++ matplotlib-3.5.3/lib/matplotlib/tests/test_mlab.py
@@ -92,7 +92,7 @@ def test_window():
class TestDetrend:
- def setup(self):
+ def setup_method(self):
np.random.seed(0)
n = 1000
x = np.linspace(0., 100, n)

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Dec 7 11:28:09 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>
- Add fix-tests-pytest72.patch to fix tests failing with pytest 7.2
gh#matplotlib/matplotlib#24173
-------------------------------------------------------------------
Fri Nov 11 11:40:06 UTC 2022 - Daniel Garcia <daniel.garcia@suse.com>

View File

@ -41,6 +41,8 @@ Source1: matplotlib-mplsetup.cfg
# Bundled version of freetype and qhull for testing purposes only
Source98: http://www.qhull.org/download/qhull-2020-src-8.0.2.tgz
Source99: https://downloads.sourceforge.net/project/freetype/freetype2/2.6.1/freetype-2.6.1.tar.gz
# PATCH-FIX-UPSTREAM fix-tests-pytest72.patch gh#matplotlib/matplotlib#24173
Patch1: fix-tests-pytest72.patch
BuildRequires: %{python_module Cycler >= 0.10}
BuildRequires: %{python_module FontTools >= 4.22.0}
BuildRequires: %{python_module devel}
@ -233,7 +235,7 @@ This package includes the wxWidgets-based wxagg backend
for %{name} plotting package
%prep
%autosetup -n matplotlib-%{version}
%autosetup -p1 -n matplotlib-%{version}
#copy freetype to the right location, so that matplotlib will not try to download it
mkdir -p ~/.cache/matplotlib/
SHA=($(sha256sum %{SOURCE98}))