Hello community,

here is the log from the commit of package python-pytest-mpl for 
openSUSE:Factory checked in at 2019-11-18 20:09:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pytest-mpl (Old)
 and      /work/SRC/openSUSE:Factory/.python-pytest-mpl.new.26869 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pytest-mpl"

Mon Nov 18 20:09:30 2019 rev:2 rq:749189 version:0.11

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pytest-mpl/python-pytest-mpl.changes      
2019-07-23 22:37:30.602969740 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pytest-mpl.new.26869/python-pytest-mpl.changes
   2019-11-18 20:09:52.189607945 +0100
@@ -1,0 +2,7 @@
+Mon Nov 18 07:58:33 UTC 2019 - Tomáš Chvátal <[email protected]>
+
+- Update to 0.11:
+  * Improve error message if image shapes don't match. [#79]
+  * Properly register mpl_image_compare marker with pytest. [#83]
+
+-------------------------------------------------------------------

Old:
----
  pytest-mpl-0.10.tar.gz

New:
----
  pytest-mpl-0.11.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pytest-mpl.spec ++++++
--- /var/tmp/diff_new_pack.a07J0P/_old  2019-11-18 20:09:55.873606066 +0100
+++ /var/tmp/diff_new_pack.a07J0P/_new  2019-11-18 20:09:55.877606064 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pytest-mpl
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LLC.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pytest-mpl
-Version:        0.10
+Version:        0.11
 Release:        0
 Summary:        pytest plugin for testing Matplotlib figures
 License:        BSD-2-Clause
@@ -29,11 +29,13 @@
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
+Requires:       python-Pillow
 Requires:       python-matplotlib
 Requires:       python-nose
 Requires:       python-pytest
 BuildArch:      noarch
 # SECTION test requirements
+BuildRequires:  %{python_module Pillow}
 BuildRequires:  %{python_module matplotlib}
 BuildRequires:  %{python_module nose}
 BuildRequires:  %{python_module pytest}

++++++ pytest-mpl-0.10.tar.gz -> pytest-mpl-0.11.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/CHANGES.md 
new/pytest-mpl-0.11/CHANGES.md
--- old/pytest-mpl-0.10/CHANGES.md      2018-09-25 13:22:16.000000000 +0200
+++ new/pytest-mpl-0.11/CHANGES.md      2019-11-15 18:37:17.000000000 +0100
@@ -1,4 +1,11 @@
-0.10 (unreleased)
+0.11 (2019-11-15)
+-----------------
+
+- Improve error message if image shapes don't match. [#79]
+
+- Properly register mpl_image_compare marker with pytest. [#83]
+
+0.10 (2018-09-25)
 -----------------
 
 - Improve error message when baseline image is not found. [#76]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/PKG-INFO new/pytest-mpl-0.11/PKG-INFO
--- old/pytest-mpl-0.10/PKG-INFO        2018-09-25 13:26:29.000000000 +0200
+++ new/pytest-mpl-0.11/PKG-INFO        2019-11-15 18:38:28.000000000 +0100
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: pytest-mpl
-Version: 0.10
+Version: 0.11
 Summary: pytest plugin to help with testing figures output from Matplotlib
 Home-page: https://github.com/matplotlib/pytest-mpl
 Author: Thomas Robitaille
 Author-email: [email protected]
 License: BSD
-Description-Content-Type: UNKNOWN
 Description: |Travis Build Status| |AppVeyor Build status| |Coveralls coverage|
         
         About
@@ -169,7 +168,7 @@
         ^^^^^^^^^^
         
         By default, tests will be run using the Matplotlib 'classic' style
-        (ignoring any locally defined RC parameters). This can be overriden by
+        (ignoring any locally defined RC parameters). This can be overridden by
         using the ``style`` argument:
         
         .. code:: python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/README.rst 
new/pytest-mpl-0.11/README.rst
--- old/pytest-mpl-0.10/README.rst      2017-10-12 22:57:57.000000000 +0200
+++ new/pytest-mpl-0.11/README.rst      2019-11-15 18:34:38.000000000 +0100
@@ -160,7 +160,7 @@
 ^^^^^^^^^^
 
 By default, tests will be run using the Matplotlib 'classic' style
-(ignoring any locally defined RC parameters). This can be overriden by
+(ignoring any locally defined RC parameters). This can be overridden by
 using the ``style`` argument:
 
 .. code:: python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/pytest_mpl/__init__.py 
new/pytest-mpl-0.11/pytest_mpl/__init__.py
--- old/pytest-mpl-0.10/pytest_mpl/__init__.py  2018-09-25 13:22:49.000000000 
+0200
+++ new/pytest-mpl-0.11/pytest_mpl/__init__.py  2019-11-15 18:37:03.000000000 
+0100
@@ -1 +1 @@
-__version__ = '0.10'
+__version__ = '0.11'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/pytest_mpl/plugin.py 
new/pytest-mpl-0.11/pytest_mpl/plugin.py
--- old/pytest-mpl-0.10/pytest_mpl/plugin.py    2018-09-25 13:22:16.000000000 
+0200
+++ new/pytest-mpl-0.11/pytest_mpl/plugin.py    2019-11-15 18:34:38.000000000 
+0100
@@ -49,6 +49,13 @@
     string_types = str
 
 
+SHAPE_MISMATCH_ERROR = """Error: Image dimensions did not match.
+  Expected shape: {expected_shape}
+    {expected_path}
+  Actual shape: {actual_shape}
+    {actual_path}"""
+
+
 def _download_file(baseline, filename):
     # Note that baseline can be a comma-separated list of URLs that we can
     # then treat as mirrors
@@ -97,6 +104,8 @@
 
 def pytest_configure(config):
 
+    config.addinivalue_line('markers', "mpl_image_compare: Compares matplotlib 
figures against a baseline image")
+
     if config.getoption("--mpl") or config.getoption("--mpl-generate-path") is 
not None:
 
         baseline_dir = config.getoption("--mpl-baseline-path")
@@ -183,6 +192,7 @@
         if compare is None:
             return
 
+        from PIL import Image
         import matplotlib
         import matplotlib.pyplot as plt
         from matplotlib.testing.compare import compare_images
@@ -272,6 +282,17 @@
                     baseline_image = os.path.abspath(os.path.join(result_dir, 
'baseline-' + filename))
                     shutil.copyfile(baseline_image_ref, baseline_image)
 
+                    # Compare image size ourselves since the Matplotlib 
exception is a bit cryptic in this case
+                    # and doesn't show the filenames
+                    expected_shape = Image.open(baseline_image).size
+                    actual_shape = Image.open(test_image).size
+                    if expected_shape != actual_shape:
+                        error = 
SHAPE_MISMATCH_ERROR.format(expected_path=baseline_image,
+                                                            
expected_shape=expected_shape,
+                                                            
actual_path=test_image,
+                                                            
actual_shape=actual_shape)
+                        pytest.fail(error, pytrace=False)
+
                     msg = compare_images(baseline_image, test_image, 
tol=tolerance)
 
                     if msg is None:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/pytest_mpl.egg-info/PKG-INFO 
new/pytest-mpl-0.11/pytest_mpl.egg-info/PKG-INFO
--- old/pytest-mpl-0.10/pytest_mpl.egg-info/PKG-INFO    2018-09-25 
13:26:29.000000000 +0200
+++ new/pytest-mpl-0.11/pytest_mpl.egg-info/PKG-INFO    2019-11-15 
18:38:27.000000000 +0100
@@ -1,12 +1,11 @@
 Metadata-Version: 1.1
 Name: pytest-mpl
-Version: 0.10
+Version: 0.11
 Summary: pytest plugin to help with testing figures output from Matplotlib
 Home-page: https://github.com/matplotlib/pytest-mpl
 Author: Thomas Robitaille
 Author-email: [email protected]
 License: BSD
-Description-Content-Type: UNKNOWN
 Description: |Travis Build Status| |AppVeyor Build status| |Coveralls coverage|
         
         About
@@ -169,7 +168,7 @@
         ^^^^^^^^^^
         
         By default, tests will be run using the Matplotlib 'classic' style
-        (ignoring any locally defined RC parameters). This can be overriden by
+        (ignoring any locally defined RC parameters). This can be overridden by
         using the ``style`` argument:
         
         .. code:: python
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/pytest_mpl.egg-info/requires.txt 
new/pytest-mpl-0.11/pytest_mpl.egg-info/requires.txt
--- old/pytest-mpl-0.10/pytest_mpl.egg-info/requires.txt        2018-09-25 
13:26:29.000000000 +0200
+++ new/pytest-mpl-0.11/pytest_mpl.egg-info/requires.txt        2019-11-15 
18:38:27.000000000 +0100
@@ -1,3 +1,4 @@
 pytest
 matplotlib
+pillow
 nose
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pytest-mpl-0.10/setup.py new/pytest-mpl-0.11/setup.py
--- old/pytest-mpl-0.10/setup.py        2017-07-19 11:01:36.000000000 +0200
+++ new/pytest-mpl-0.11/setup.py        2019-11-15 18:37:11.000000000 +0100
@@ -18,7 +18,7 @@
     long_description=long_description,
     packages=['pytest_mpl'],
     package_data={'pytest_mpl': ['classic.mplstyle']},
-    install_requires=['pytest', 'matplotlib', 'nose'],
+    install_requires=['pytest', 'matplotlib', 'pillow', 'nose'],
     license='BSD',
     author='Thomas Robitaille',
     author_email='[email protected]',


Reply via email to