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
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions lib/matplotlib/__init__.py
Expand Up @@ -1545,6 +1545,7 @@ def _jupyter_nbextension_paths():
'matplotlib.tests.test_type1font',
'matplotlib.tests.test_ttconv',
'matplotlib.tests.test_units',
'matplotlib.tests.test_usetex',
'matplotlib.tests.test_widgets',
'matplotlib.tests.test_cycles',
'matplotlib.tests.test_preprocess_data',
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 9 additions & 2 deletions lib/matplotlib/tests/test_usetex.py
Expand Up @@ -3,11 +3,18 @@

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'])
@image_comparison(baseline_images=['test_usetex'],
extensions=['pdf', 'png'],
tol=0.3)
def test_usetex():
canusetex = matplotlib.checkdep_usetex(True)
if not canusetex:
from nose import SkipTest
raise SkipTest('Cannot run usetex_test')
matplotlib.rcParams['text.usetex'] = True
fig = plt.figure()
ax = fig.add_subplot(111)
Expand All @@ -16,7 +23,7 @@ def test_usetex():
# \left[ ... \right\} draw some variable-height characters,
# \sqrt and \frac draw horizontal rules, \mathrm changes the font
r'\LaTeX\ $\left[\int\limits_e^{2e}'
r'\sqrt\frac{\log^3 x}{x}\,\mathrm{d}x \right\}',
r'\sqrt\frac{\log^3 x}{x}\,\mathrm{d}x \right\}$',
fontsize=24)
ax.set_xticks([])
ax.set_yticks([])