Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit faf2347

Browse files
committed
TST: skip test_dviread if kpsewhich is not available
Also fix the docstring to mention that it is part of miktex...
1 parent 2a4863c commit faf2347

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

lib/matplotlib/dviread.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,8 +961,8 @@ def find_tex_file(filename, format=None):
961961
`--format` option.
962962
963963
Apparently most existing TeX distributions on Unix-like systems
964-
use kpathsea. I hear MikTeX (a popular distribution on Windows)
965-
doesn't use kpathsea, so what do we do? (TODO)
964+
use kpathsea. It's also available as part of MikTeX, a popular
965+
distribution on Windows.
966966
967967
.. seealso::
968968

lib/matplotlib/tests/test_dviread.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
unicode_literals)
33

44
from matplotlib.externals import six
5+
from matplotlib.compat.subprocess import check_output
6+
57

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

6264

6365
def test_dviread():
66+
try:
67+
check_output(["kpsewhich", "-version"])
68+
except:
69+
raise SkipTest('kpsewhich is required')
70+
6471
dir = os.path.join(os.path.dirname(__file__), 'baseline_images', 'dviread')
6572
with open(os.path.join(dir, 'test.json')) as f:
6673
correct = json.load(f)

0 commit comments

Comments
 (0)