Skip to content
This repository was archived by the owner on Jun 16, 2018. It is now read-only.

Use pytest-mpl - #168

Merged
astrofrog merged 4 commits into
masterfrom
use-pytest-mpl
Jul 1, 2015
Merged

astrofrog merged 4 commits into
masterfrom
use-pytest-mpl

Conversation

@astrofrog

Copy link
Copy Markdown
Owner

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.

Comment thread wcsaxes/tests/test_frame.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned in https://github.com/astrofrog/pytest-mpl/issues/7#issuecomment-115407826, I think having to repeat baseline_dir='baseline_images' is not nice and it would be better to have this as a global option (just in case I didn't make myself clear there).

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, this should now be fixed in this PR using pytest-mpl v0.2

@cdeil

cdeil commented Jun 26, 2015

Copy link
Copy Markdown
Contributor

@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

Copy link
Copy Markdown
Owner Author

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

@astrofrog

Copy link
Copy Markdown
Owner Author

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

@astrofrog

Copy link
Copy Markdown
Owner Author

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

@cdeil

cdeil commented Jun 26, 2015

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Owner Author

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 <[email protected]>
Date:   Tue Jun 23 10:27:44 2015 -0400

    Upgrade to wcslib 5.6

:040000 040000 a5f94f3645be1220fa0d7ccf92a2f404d3e894e5 59e866a0474b996cb9b4fcffb297ac073e04b096 M  cextern

@astrofrog

Copy link
Copy Markdown
Owner Author

Finally managed to make a minimal example to reproduce the issue with Astropy: astropy/astropy#3891

@astrofrog

Copy link
Copy Markdown
Owner Author

astrofrog added a commit that referenced this pull request Jul 1, 2015
@astrofrog
astrofrog merged commit c601bfa into master Jul 1, 2015
astrofrog added a commit that referenced this pull request Nov 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants