diff --git a/fix-tests-pytest72.patch b/fix-tests-pytest72.patch new file mode 100644 index 0000000..b3ee25e --- /dev/null +++ b/fix-tests-pytest72.patch @@ -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) diff --git a/python-matplotlib.changes b/python-matplotlib.changes index 237b821..7292628 100644 --- a/python-matplotlib.changes +++ b/python-matplotlib.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Wed Dec 7 11:28:09 UTC 2022 - Daniel Garcia + +- 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 diff --git a/python-matplotlib.spec b/python-matplotlib.spec index 0053272..4c07266 100644 --- a/python-matplotlib.spec +++ b/python-matplotlib.spec @@ -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}))