-
Notifications
You must be signed in to change notification settings - Fork 49
ENH: Support setting the backend per-test. (Fixes #35) #38
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
Conversation
54b9ab2 to
09757a7
Compare
| baseline_remote = baseline_dir.startswith('http') | ||
|
|
||
| with plt.style.context(style): | ||
| with plt.style.context(style), switch_backend(backend): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dopplershift looks like this is causing issues with Python 2.6. Does Matplotlib still support Python 2.6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only on the 1.4 series--so I guess the question is when does pytest-mpl drop 1.4?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now 2.0 is out, I'd be fine with dropping 1.4 (I normally like keeping compatibility with the latest two versions)
09757a7 to
36f9890
Compare
|
I've gone ahead and removed all traces of Python 2.6 and Matplotlib 1.4--I'm hoping that's what you were looking for. Rebased on latest master. |
cb9ff8e to
f4a588e
Compare
|
This isn't introducing any new test failures. Apparently, something's not quite right with testing against matplotlib 2.0. |
|
@dopplershift - can you rebase on the latest master? (I've merged in changes that should fix Travis) |
f4a588e to
63caacc
Compare
|
Linux tests are failing because conda can't find packages for numpy 1.9 and matplotlib 1.5. Thoughts? |
|
Anything more you'd like to see here? |
.travis.yml
Outdated
| - PYTHON_VERSION=3.3 MATPLOTLIB_VERSION=1.4 NUMPY_VERSION=1.9 | ||
| - PYTHON_VERSION=3.4 MATPLOTLIB_VERSION=1.4 NUMPY_VERSION=1.9 | ||
| - PYTHON_VERSION=3.3 MATPLOTLIB_VERSION=1.5 NUMPY_VERSION=1.9 | ||
| - PYTHON_VERSION=3.4 MATPLOTLIB_VERSION=1.5 NUMPY_VERSION=1.9 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dopplershift - try not pinnng the Numpy version here
63caacc to
a97e80f
Compare
|
No conda packages for Python 3.3 for matplotlib 1.5. Willing to drop Python 3.3? We'd still have the last 3 versions of the 3.x series. |
|
@dopplershift - You can always move mpl from |
|
True, but probably best to make a firm decision on 3.3 support, or at least testing for it. |
|
Does Matplotlib support 3.3? |
|
As far back as 1.5, matplotlib is >= 3.4: http://matplotlib.org/1.5.3/users/installing.html |
|
Ok then yes let's drop 3.3 |
|
All testing passing now. |
|
Are we waiting on anything here? |
|
(on vacation but will review/merge on my return!) |
|
Since #47, plt and matplotlib are only available locally, so there's a logical merge conflict in this PR. Since matplotlib is only imported locally now, the user at least has the option to import matplotlib globally and set the backend once as a fixture, prior to it being imported by pytest-mpl. I also wonder if we can more generally allow the user to specify arguments for |
|
@dopplershift - this looks good, but as @jnothman pointed out this won't work as-is due to #47, so could you rebase and make sure that the tests pass locally? |
This works by using matplotlib's "experimental" support for switching backends, and should only be used to switch between image backends.
Matplotlib only has 1.4 wheels for that, which we're removing here.
Conda doesn't have packages for that combination.
Matplotlib >= 1.5 only supports Python >= 3.4, so given we've dropped matplotlib 1.4, it doesn't make sense to support 3.3.
dbf4653 to
9f73275
Compare
|
Rebased and tests pass locally. |
|
Looks like we're good here. |
|
Thanks @dopplershift! |
This works by using matplotlib's "experimental" support for switching
backends, and should only be used to switch between image backends.