enable previously leftout test_usetex #6918

Merged
merged 5 commits into from Aug 30, 2016

Conversation

Projects
None yet
3 participants
Owner

jenshnielsen commented Aug 7, 2016

Follow up to #6917 with the tests only on master

Owner

jenshnielsen commented Aug 7, 2016

Have not had the time to investigate why the png test fails. It passes with that image for me locally.

jenshnielsen added some commits Aug 7, 2016

@jenshnielsen jenshnielsen enable previously leftout test_usetex 0833719
@jenshnielsen jenshnielsen Add missing $ beaaff5
@jenshnielsen jenshnielsen Adjust tol so that test pass both locally for me on osx and on travis
50c0b74
Owner

jenshnielsen commented Aug 13, 2016

Reproduced the failure locally on a Ubuntu 12.04 vm. The text looks correct but is slightly different. I don't think this is a font issue so it is probably due to different tex versions.
Attached diff between travis and current reference from my OSX machine
test_usetex-failed-diff

Owner

jenshnielsen commented Aug 13, 2016

This still need a skip if not latex decorator

@jenshnielsen jenshnielsen Skip test if latex not installed
Cannot use the decorator for similar reasons as #6263
d38ec34

tacaswell added this to the 2.1 (next point release) milestone Aug 13, 2016

Owner

jenshnielsen commented Aug 15, 2016

I think this is ready to land now

Member

Kojoley commented Aug 15, 2016

@jenshnielsen please try to rearrange extension order. If it will pass with ['png', 'pdf'] then this is #6899 bug.

Owner

jenshnielsen commented Aug 15, 2016

@Kojoley Good point, I will give it a try

@Kojoley Kojoley and 1 other commented on an outdated diff Aug 15, 2016

lib/matplotlib/tests/test_usetex.py
import matplotlib.pyplot as plt
@image_comparison(baseline_images=['test_usetex'],
extensions=['pdf', 'png'],
tol=0.3)
def test_usetex():
+ cmd = ['latex', '-version']
+ try:
+ check_output(cmd)
+ except:
+ from nose import SkipTest
+ raise SkipTest('missing command: %s' % cmd[0])
@Kojoley

Kojoley Aug 15, 2016

Member

Why not to use skip_if_command_unavailable decorator?

@jenshnielsen

jenshnielsen Aug 15, 2016

Owner

Please read the commit message

@Kojoley

Kojoley Aug 15, 2016

Member

Please read the commit message

The actual problem commit is gone there and only comment left. :(

At least you can simplify this with matplotlib.checkdep_tex() call.

@jenshnielsen

jenshnielsen Aug 15, 2016

Owner

I have updated this to use checkdep_usetex which is what we want

@jenshnielsen jenshnielsen Use checkdep_usetex to check for usetex
baab5d2
Owner

jenshnielsen commented Aug 30, 2016

I think this is ready to merge, the change in coverage seems to be a fluke. The tolerance does not seem to depend on the order it is passing and failing on different backends because of tex version differences. I can reproduce the image that matches travis on a ubuntu 12.04 vm (same os and texlive version as travis) but get different results with a modern texlive install.

@tacaswell tacaswell merged commit af16ac8 into matplotlib:master Aug 30, 2016

2 of 3 checks passed

coverage/coveralls Coverage decreased (-0.2%) to 70.61%
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

tacaswell removed the needs_review label Aug 30, 2016

@jenshnielsen jenshnielsen added a commit to jenshnielsen/matplotlib that referenced this pull request Aug 31, 2016

@jenshnielsen jenshnielsen Don't blacklist test_usetex using pytest
The tests where fixed in #6918 but not enabled for pytest
8e4dd95

jenshnielsen deleted the jenshnielsen:addtestusetextodefaulttests branch Aug 31, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment