Skip to content

Commit baab5d2

Browse files
committed
Use checkdep_usetex to check for usetex
1 parent d38ec34 commit baab5d2

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/matplotlib/tests/test_usetex.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,10 @@
1111
extensions=['pdf', 'png'],
1212
tol=0.3)
1313
def test_usetex():
14-
cmd = ['latex', '-version']
15-
try:
16-
check_output(cmd)
17-
except:
14+
canusetex = matplotlib.checkdep_usetex(True)
15+
if not canusetex:
1816
from nose import SkipTest
19-
raise SkipTest('missing command: %s' % cmd[0])
17+
raise SkipTest('Cannot run usetex_test')
2018
matplotlib.rcParams['text.usetex'] = True
2119
fig = plt.figure()
2220
ax = fig.add_subplot(111)

0 commit comments

Comments
 (0)