Skip to content

Merge pull request #5815 from mdboom/fix-minimizing-raster-layer #5817

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 10, 2016

Conversation

tacaswell
Copy link
Member

Properly minimize the rasterized layers
Conflicts:
lib/matplotlib/tests/test_image.py

One too-many tests where cherry-picked

The backport of #5815 is not passing locally for me, I am getting

2:30 $ python tests.py --processes=8 --process-timeout=300 matplotlib.tests.test_image:test_rasterize_dpi.test
.F
======================================================================
FAIL: matplotlib.tests.test_image.test_rasterize_dpi.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/tcaswell/source/other_source/nose/build/lib/nose/case.py", line 198, in runTest
    self.test(*self.arg)
  File "/home/tcaswell/source/my_source/matplotlib/lib/matplotlib/testing/decorators.py", line 53, in failer
    result = f(*args, **kwargs)
  File "/home/tcaswell/source/my_source/matplotlib/lib/matplotlib/testing/decorators.py", line 220, in do_test
    '(RMS %(rms).3f)'%err)
matplotlib.testing.exceptions.ImageComparisonFailure: images not close: /home/tcaswell/source/my_source/matplotlib/result_images/test_image/rasterize_10dpi_svg.png vs. /home/tcaswell/source/my_source/matplotlib/result_images/test_image/rasterize_10dpi-expected_svg.png (RMS 5.661)

----------------------------------------------------------------------
Ran 2 tests in 0.357s

FAILED (failures=1)


@tacaswell tacaswell added this to the Critical bugfix release (1.5.1) milestone Jan 9, 2016
…layer

Properly minimize the rasterized layers
Conflicts:
	lib/matplotlib/tests/test_image.py

One too-many tests were cherry-picked
@tacaswell
Copy link
Member Author

on travis this is broken on 2.6

======================================================================
ERROR: matplotlib.tests.test_image.test_minimized_rasterized
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.6/site-packages/matplotlib-1.5.1rc1+6.g9346bc6-py2.6-linux-x86_64.egg/matplotlib/testing/decorators.py", line 118, in wrapped_function
    func(*args, **kwargs)
  File "/home/travis/build/matplotlib/matplotlib/venv/lib/python2.6/site-packages/matplotlib-1.5.1rc1+6.g9346bc6-py2.6-linux-x86_64.egg/matplotlib/tests/test_image.py", line 484, in test_minimized_rasterized
    for image in tree.iter('image'):
AttributeError: ElementTree instance has no attribute 'iter'
----------------------------------------------------------------------

I think we should just known fail that test on 2.6 (rather than drop 2.6 from the 1.5.x build matrix).

@mdboom
Copy link
Member

mdboom commented Jan 10, 2016

Agree on the Python 2.6 issue. Not sure about the rasterize_10dpi thing, though it definitely seems related to the change. I'm happy to look, but the week ahead is busy for me...

@tacaswell
Copy link
Member Author

and of course now I have an import error on 2.6...

@mdboom
Copy link
Member

mdboom commented Jan 10, 2016

If someone gets to this before I do -- maybe look into reinstating the "-1" in the std::max lines -- that was a behavior change that was added because neither @WeatherGod or I could understand why it was necessary, and it didn't break the tests on master. But maybe that's breaking something here. Just a wild guess as the first place I'd start...

tacaswell added a commit that referenced this pull request Jan 10, 2016
Merge pull request #5815 from mdboom/fix-minimizing-raster-layer
@tacaswell tacaswell merged commit ac8cfb3 into matplotlib:v1.5.x Jan 10, 2016
@tacaswell tacaswell deleted the backport branch January 10, 2016 20:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants