Skip to content

test_rasterize_dpi fails with 1.5.1 #5829

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

Closed
felixonmars opened this issue Jan 11, 2016 · 8 comments
Closed

test_rasterize_dpi fails with 1.5.1 #5829

felixonmars opened this issue Jan 11, 2016 · 8 comments
Assignees
Milestone

Comments

@felixonmars
Copy link
Contributor

I am getting only one test failure for both Python 2.7.11 and 3.5.1 on Arch. Hope this helps :)

======================================================================
FAIL: matplotlib.tests.test_image.test_rasterize_dpi.test
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "/build/python-matplotlib/src/matplotlib-1.5.1-py2/build/lib.linux-x86_64-2.7/matplotlib/testing/decorators.py", line 53, in failer
    result = f(*args, **kwargs)
  File "/build/python-matplotlib/src/matplotlib-1.5.1-py2/build/lib.linux-x86_64-2.7/matplotlib/testing/decorators.py", line 220, in do_test
    '(RMS %(rms).3f)'%err)
ImageComparisonFailure: images not close: /build/python-matplotlib/src/tmp_test_dir/result_images/test_image/rasterize_10dpi_svg.png vs. /build/python-matplotlib/src/tmp_test_dir/result_images/test_image/rasterize_10dpi-expected_svg.png (RMS 5.661)

----------------------------------------------------------------------
Ran 5165 tests in 136.270s

FAILED (KNOWNFAIL=18, SKIP=1, failures=1)
Shape of x does not match that of z: found (9, 9) instead of (9, 10).
@tacaswell tacaswell added this to the Critical bug fix release (1.5.2) milestone Jan 11, 2016
@tacaswell
Copy link
Member

hmm, I saw the same thing locally in #5817 (I use arch 😄 ) but everything is passing on travis so I wrote it off as a local issue....

@jenshnielsen
Copy link
Member

I'm seeing it too. Not sure why Travis doesn't catch it

@mdboom
Copy link
Member

mdboom commented Jan 11, 2016

Just as another data point -- I can't reproduce in Python 2.7.11 or 3.5.1 (Conda on Fedora). Can someone who's hitting this post the SVG file so I can see how it's failing?

@mdboom
Copy link
Member

mdboom commented Jan 11, 2016

I'm able to reproduce it now -- I think I wasn't getting a full rebuild earlier.

@tacaswell
Copy link
Member

Sorry everyone 😞 .

@mdboom
Copy link
Member

mdboom commented Jan 11, 2016

I think what we're running into is how Inkscape is handling image edge rendering -- which appears to be different in the version of Inkscape on Travis (which I think is 0.48.1), and that on our local machines (which is probably the latest 0.91). The old Inkscape will resample the image such that it "bleeds" outside of the image bounding box. This creates the same rendering before and after the matplotlib change. The new Inkscape seems to strictly crop the image to the image bounding box, creating a different rendering between the two images -- the old has bleed (since it wasn't cropped correctly) and the new one doesn't.

The bottom line is that I think it's safe to update the image to the latest generated in this case. There isn't actually a matplotlib bug here as far as I can tell -- the entire image content (and nothing more) is making it into the output SVG, which is exactly right.

@tacaswell
Copy link
Member

Probably need to add a test on inkscape version too so we can skip on travis?

@mdboom
Copy link
Member

mdboom commented Jan 11, 2016

Probably need to add a test on inkscape version too so we can skip on travis?

Hopefully by updating the baseline image, we won't be Inkscape-version-dependent anymore.

@mdboom mdboom self-assigned this Jan 11, 2016
jenshnielsen added a commit that referenced this issue Jan 12, 2016
tacaswell pushed a commit to tacaswell/matplotlib that referenced this issue May 22, 2016
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

No branches or pull requests

4 participants