From 0396c712dea5b8d21258b635469ef7c19142ce5b Mon Sep 17 00:00:00 2001 From: "P. L. Lim" <2090236+pllim@users.noreply.github.com> Date: Fri, 13 Mar 2020 12:31:58 -0400 Subject: [PATCH] TST: Skip test if matplotlib too old --- astropy/visualization/wcsaxes/tests/test_misc.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/astropy/visualization/wcsaxes/tests/test_misc.py b/astropy/visualization/wcsaxes/tests/test_misc.py index 8b5315bd96a9..3063b7de9d43 100644 --- a/astropy/visualization/wcsaxes/tests/test_misc.py +++ b/astropy/visualization/wcsaxes/tests/test_misc.py @@ -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: + pytest.skip('Incompatible with old matplotlib') + plt.rc('text', usetex=True) header = {