Skip to content

Commit

Permalink
TST: Skip test if matplotlib too old
Browse files Browse the repository at this point in the history
  • Loading branch information
pllim committed Mar 13, 2020
1 parent 045ec8f commit 0e639ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions astropy/visualization/wcsaxes/tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,10 +449,13 @@ def test_time_wcs(time_spectral_wcs_2d):
plt.subplot(projection=time_spectral_wcs_2d)


@pytest.mark.skipif('MATPLOTLIB_LT_21')
@ignore_matplotlibrc
def test_simplify_labels_usetex(tmpdir):
"""Regression test for https://github.com/astropy/astropy/issues/8004."""
# pytest.mark.skipif() did not work as expected, so we do this here.
if MATPLOTLIB_LT_21 or not matplotlib.checkdep_usetex(True):
pytest.skip('Incompatible with old matplotlib or TeX is not available')

plt.rc('text', usetex=True)

header = {
Expand Down Expand Up @@ -480,7 +483,4 @@ def test_simplify_labels_usetex(tmpdir):
ax.coords[1].set_ticks(spacing=30 * u.deg)
ax.grid()

if not matplotlib.checkdep_usetex(True):
pytest.skip('TeX is not available')

fig.savefig(tmpdir / 'plot.png')

0 comments on commit 0e639ba

Please sign in to comment.