Skip to content

Commit

Permalink
TST: skip test_dviread if kpsewhich is not available
Browse files Browse the repository at this point in the history
Also fix the docstring to mention that it is part of miktex...
  • Loading branch information
jankatins committed Jan 26, 2016
1 parent 2a4863c commit faf2347
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/matplotlib/dviread.py
Expand Up @@ -961,8 +961,8 @@ def find_tex_file(filename, format=None):
`--format` option.
Apparently most existing TeX distributions on Unix-like systems
use kpathsea. I hear MikTeX (a popular distribution on Windows)
doesn't use kpathsea, so what do we do? (TODO)
use kpathsea. It's also available as part of MikTeX, a popular
distribution on Windows.
.. seealso::
Expand Down
7 changes: 7 additions & 0 deletions lib/matplotlib/tests/test_dviread.py
Expand Up @@ -2,6 +2,8 @@
unicode_literals)

from matplotlib.externals import six
from matplotlib.compat.subprocess import check_output


from nose.tools import assert_equal, with_setup
import matplotlib.dviread as dr
Expand Down Expand Up @@ -61,6 +63,11 @@ def test_PsfontsMap():


def test_dviread():
try:
check_output(["kpsewhich", "-version"])
except:
raise SkipTest('kpsewhich is required')

dir = os.path.join(os.path.dirname(__file__), 'baseline_images', 'dviread')
with open(os.path.join(dir, 'test.json')) as f:
correct = json.load(f)
Expand Down

0 comments on commit faf2347

Please sign in to comment.