From 62bd85816c85a7064ffa87944a6897d349db91da Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Dec 13 2020 09:03:16 +0000 Subject: Update to latest version. --- diff --git a/.gitignore b/.gitignore index e5eb0d1..38b8d3b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /pytest-mpl-0.9.tar.gz /pytest-mpl-0.10.tar.gz /pytest-mpl-0.11.tar.gz +/pytest-mpl-0.12.tar.gz diff --git a/0001-Increase-tolerance-for-new-FreeType.patch b/0001-Increase-tolerance-for-new-FreeType.patch index 8152346..de81b5d 100644 --- a/0001-Increase-tolerance-for-new-FreeType.patch +++ b/0001-Increase-tolerance-for-new-FreeType.patch @@ -1,45 +1,53 @@ -From fd80f1bd65e1fde4f2505dd0b2065b21659d12a4 Mon Sep 17 00:00:00 2001 +From cb75688d5cbdcecbca550d6661e4734a7121854f Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Mon, 16 Jul 2018 00:52:13 -0400 Subject: [PATCH] Increase tolerance for new FreeType. Signed-off-by: Elliott Sales de Andrade --- - tests/test_pytest_mpl.py | 9 +++++---- - 1 file changed, 5 insertions(+), 4 deletions(-) + tests/test_pytest_mpl.py | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_pytest_mpl.py b/tests/test_pytest_mpl.py -index 1fa0379..064f39b 100644 +index 146bc0a..1dc7bc1 100644 --- a/tests/test_pytest_mpl.py +++ b/tests/test_pytest_mpl.py -@@ -23,7 +23,7 @@ baseline_dir_remote = 'http://matplotlib.github.io/pytest-mpl/' + baseline_subdi - WIN = sys.platform.startswith('win') +@@ -54,7 +54,7 @@ def assert_pytest_fails_with(args, output_substring): --@pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local) -+@pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local, tolerance=7.1) + @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local, +- tolerance=DEFAULT_TOLERANCE) ++ tolerance=7.1) def test_succeeds(): fig = plt.figure() ax = fig.add_subplot(1, 1, 1) -@@ -52,7 +52,8 @@ def test_succeeds_faulty_mirror(): - +@@ -86,7 +86,7 @@ def test_succeeds_faulty_mirror(): class TestClass(object): -- @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local) -+ @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local, + @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local, +- tolerance=DEFAULT_TOLERANCE) + tolerance=7.1) def test_succeeds(self): fig = plt.figure() ax = fig.add_subplot(1, 1, 1) -@@ -210,7 +211,7 @@ class TestClassWithSetup(object): - self.x = [1, 2, 3] +@@ -213,7 +213,7 @@ def test_nofigure(): + + @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local, + style='fivethirtyeight', +- tolerance=DEFAULT_TOLERANCE) ++ tolerance=7.5) + def test_base_style(): + fig = plt.figure() + ax = fig.add_subplot(1, 1, 1) +@@ -249,7 +249,7 @@ class TestClassWithSetup: @pytest.mark.mpl_image_compare(baseline_dir=baseline_dir_local, -- filename='test_succeeds.png') -+ filename='test_succeeds.png', tolerance=7.1) + filename='test_succeeds.png', +- tolerance=DEFAULT_TOLERANCE) ++ tolerance=7.1) def test_succeeds(self): fig = plt.figure() ax = fig.add_subplot(1, 1, 1) -- -2.17.1 +2.26.2 diff --git a/python-pytest-mpl.spec b/python-pytest-mpl.spec index e0a430c..7ab4f3e 100644 --- a/python-pytest-mpl.spec +++ b/python-pytest-mpl.spec @@ -1,13 +1,15 @@ %global srcname pytest-mpl Name: python-%{srcname} -Version: 0.11 -Release: 4%{?dist} +Version: 0.12 +Release: 1%{?dist} Summary: Pytest plugin for testing figure output from Matplotlib License: BSD URL: https://github.com/matplotlib/pytest-mpl Source0: https://files.pythonhosted.org/packages/source/p/%{srcname}/%{srcname}-%{version}.tar.gz +# Missing file: https://github.com/matplotlib/pytest-mpl/pull/109 +Source1: https://github.com/matplotlib/pytest-mpl/raw/01c5ec39caa5001d700c7819628b57c798f1e2bb/tests/baseline/test_hash_lib.json # Probably not going upstream. Patch0001: 0001-Increase-tolerance-for-new-FreeType.patch @@ -38,6 +40,7 @@ BuildRequires: python3dist(setuptools) %prep %autosetup -n %{srcname}-%{version} -p1 +cp %SOURCE1 tests/baseline/ # Remove bundled egg-info rm -rf %{srcname}.egg-info @@ -53,10 +56,8 @@ rm -rf %{srcname}.egg-info %check # Skip networked tests. -PYTHONPATH=%{buildroot}%{python3_sitelib} MPLBACKEND=Agg PYTHONDONTWRITEBYTECODE=1 \ - pytest-3 --mpl tests -k 'not test_succeeds_remote and not test_succeeds_faulty_mirror' -PYTHONPATH=%{buildroot}%{python3_sitelib} MPLBACKEND=Agg PYTHONDONTWRITEBYTECODE=1 \ - pytest-3 tests -k 'not test_succeeds_remote and not test_succeeds_faulty_mirror' +MPLBACKEND=Agg %{pytest} --mpl tests -k 'not test_succeeds_remote and not test_succeeds_faulty_mirror' +MPLBACKEND=Agg %{pytest} tests -k 'not test_succeeds_remote and not test_succeeds_faulty_mirror' %files -n python3-%{srcname} @@ -67,6 +68,9 @@ PYTHONPATH=%{buildroot}%{python3_sitelib} MPLBACKEND=Agg PYTHONDONTWRITEBYTECODE %changelog +* Sun Dec 13 2020 Elliott Sales de Andrade - 0.12-1 +- Update to latest version (#1894886) + * Wed Jul 29 2020 Fedora Release Engineering - 0.11-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/sources b/sources index 049c7a8..06c19db 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pytest-mpl-0.11.tar.gz) = 2b2126e82db16e1f06933ef40815fe808239d439756e49d1ed5947e67e4df495e343355eec99566a7d681d320a72406fa9bd64fe891758ad2d7e490d69f1c36d +SHA512 (pytest-mpl-0.12.tar.gz) = c7354054748b04905455095f35644927967ba3c353dca59fbc61e6f47cbfd62f33bfedfb0da8611230dea7bc55fe652131da79f3cc6ccb0a176bcf0699fe71a2 diff --git a/test_hash_lib.json b/test_hash_lib.json new file mode 100644 index 0000000..03ca95e --- /dev/null +++ b/test_hash_lib.json @@ -0,0 +1,5 @@ +{ + "test_pytest_mpl.test_hash_succeeds": "cd01b7a39330033b18d54b507635236214cae5e24f9e09d84b56462a9ac81052", + "test.test_hash_fails": "FAIL", + "test.test_hash_fail_hybrid": "FAIL" +}