Skip to content
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

enable previously leftout test_usetex #6918

Merged
merged 5 commits into from Aug 30, 2016
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/matplotlib/tests/test_usetex.py
Expand Up @@ -3,13 +3,20 @@

import matplotlib
from matplotlib.testing.decorators import image_comparison
from matplotlib.compat.subprocess import check_output
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])
Copy link
Member

Choose a reason for hiding this comment

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

Why not to use skip_if_command_unavailable decorator?

Copy link
Member Author

Choose a reason for hiding this comment

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

Please read the commit message

Copy link
Member

Choose a reason for hiding this comment

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

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

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

matplotlib.rcParams['text.usetex'] = True
fig = plt.figure()
ax = fig.add_subplot(111)
Expand Down