astrofrog / wcsaxes

wcsaxes has been merged into astropy!
http://docs.astropy.org/en/stable/visualization/wcsaxes/index.html
22 stars 21 forks source link

Use pytest-mpl #168

Closed astrofrog closed 9 years ago

astrofrog commented 9 years ago

This will need the 0.2 release of pytest-mpl to work. Will update .travis.yml once 0.2 is available.

@cdeil, just pinging you so you can see it in use in a real package.

cdeil commented 9 years ago

@astrofrog – Looks like all the image diffs are now above tolerance and all tests fail? https://travis-ci.org/astrofrog/wcsaxes/jobs/68404458#L621

This is just moving code to a different place, the results should be the same, no?

astrofrog commented 9 years ago

The failures are only with the developer version of astropy. Looking into it.

astrofrog commented 9 years ago

The failures are on master too, it's just that the tests don't get run regularly enough with astropy changes.

astrofrog commented 9 years ago

I'm going to guess it's related to WCSLib 5

cdeil commented 9 years ago

I guess the way to debug image difference failures is to blink the images and maybe compute and look at difference images? Could be useful to say a few sentences how to do this in pytest-mpl or even to include a small command line tool that pops up a matplotlib Window or web page to do this when pointed at the right folders or files (or via a py.test option ... it should know already where the baseline images are and can re-compute the current images).

astrofrog commented 9 years ago

This is a nice example.

Expected

baseline-coords_overlay_auto_coord_meta

Actual

coords_overlay_auto_coord_meta

I can include these in the pytest-mpl docs. The bad commit in astropy according to bisect is:

7bac4706bb70c6eb973a528a1a592c63ee0e1a8b is the first bad commit
commit 7bac4706bb70c6eb973a528a1a592c63ee0e1a8b
Author: Michael Droettboom <mdboom@gmail.com>
Date:   Tue Jun 23 10:27:44 2015 -0400

    Upgrade to wcslib 5.6

:040000 040000 a5f94f3645be1220fa0d7ccf92a2f404d3e894e5 59e866a0474b996cb9b4fcffb297ac073e04b096 M  cextern
astrofrog commented 9 years ago

Finally managed to make a minimal example to reproduce the issue with Astropy: https://github.com/astropy/astropy/issues/3891

astrofrog commented 9 years ago

@cdeil - added an example to the pytest-mpl README based on the above: https://github.com/astrofrog/pytest-mpl/blob/master/README.md#test-failure-example