Skip to content

test_rasterize_dpi fails with 1.5.1 #5829

Closed

Description

@felixonmars

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).

Activity

  1. added this to the milestone on Jan 11, 2016
  2. tacaswell commented on Jan 11, 2016

    @tacaswell
    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....

  3. jenshnielsen commented on Jan 11, 2016

    @jenshnielsen
    Member

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

  4. mdboom commented on Jan 11, 2016

    @mdboom
    Member

    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?

  5. mdboom commented on Jan 11, 2016

    @mdboom
    Member

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

  6. tacaswell commented on Jan 11, 2016

    @tacaswell
    Member

    Sorry everyone 😞 .

  7. mdboom commented on Jan 11, 2016

    @mdboom
    Member

    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.

  8. tacaswell commented on Jan 11, 2016

    @tacaswell
    Member

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

  9. mdboom commented on Jan 11, 2016

    @mdboom
    Member

    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.

  10. added a commit that references this issue on Jan 11, 2016
    72cf5b8
  11. self-assigned this
    on Jan 11, 2016
  12. added a commit that references this issue on Jan 12, 2016
    54291ff
  13. added a commit that references this issue on May 22, 2016
    e0aa5e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions