diff --git a/.gitignore b/.gitignore index c95fdb4b1f..1dfcbba705 100644 --- a/.gitignore +++ b/.gitignore @@ -127,6 +127,7 @@ docs/examples-rendered/*.py # VSCode wants to put virtualenvs here .env +.venv # pintpublish output *.tex diff --git a/tests/test_erfautils.py b/tests/test_erfautils.py index c836ff85cf..8de6ce5e7f 100644 --- a/tests/test_erfautils.py +++ b/tests/test_erfautils.py @@ -59,22 +59,13 @@ def test_scalar(): assert posvel.pos.shape == (3,) -@pytest.mark.skip( - "I don't know why this test exists but it no longer fails after changing to astropy version of gcrs_posvel_from_itrf() -- paulr" -) -def test_matrix(): - """Confirm higher-dimensional arrays raise an exception""" - with pytest.raises(ValueError): - o = "Arecibo" - loc = Observatory.get(o).earth_location_itrf() - t = Time(56000 * np.ones((4, 5)), scale="tdb", format="mjd") - erfautils.gcrs_posvel_from_itrf(loc, t, obsname=o) - - # The below explore why astropy might disagree with PINT internal code -@pytest.mark.xfail(reason="astropy doesn't include up-to-date IERS B") +# This test checks for a bug that was in Astropy; is it fixed in the oldest version we support? +@pytest.mark.xfail( + reason="astropy doesn't include up-to-date IERS B", raises=AssertionError +) def test_IERS_B_all_in_IERS_Auto(): B = IERS_B.open(download_file(IERS_B_URL, cache=True)) mjd = B["MJD"].to(u.day).value @@ -84,7 +75,12 @@ def test_IERS_B_all_in_IERS_Auto(): assert_equal(A["dX_2000A_B"][i_A], B["dX_2000A"]) -@pytest.mark.xfail(reason="IERS changes old values in new versions of the B table") +# This test checks for a bug that was in Astropy; is it fixed in the oldest version we support? +# I think this might be the IERS that changes the old versions? +@pytest.mark.xfail( + reason="IERS changes old values in new versions of the B table", + raises=AssertionError, +) def test_IERS_B_agree_with_IERS_Auto_dX(): A = IERS_Auto.open() B = IERS_B.open(download_file(IERS_B_URL, cache=True)) @@ -113,9 +109,11 @@ def test_IERS_B_agree_with_IERS_Auto_dX(): ) -@pytest.mark.xfail( - reason="IERS changes old values in new versions of the B table in astropy 4" -) +# This test checks for a bug that was in Astropy; is it fixed in the oldest version we support? +# @pytest.mark.xfail( +# reason="IERS changes old values in new versions of the B table in astropy 4", +# raises=AssertionError, +# ) def test_IERS_B_agree_with_IERS_Auto(): A = IERS_Auto.open() B = IERS_B.open(download_file(IERS_B_URL, cache=True)) @@ -146,6 +144,7 @@ def test_IERS_B_agree_with_IERS_Auto(): ) +# This test checks for a bug that was in Astropy; is it fixed in the oldest version we support? # @pytest.mark.xfail(reason="disagreement in current astropy") def test_IERS_B_builtin_agree_with_IERS_Auto_dX(): A = IERS_Auto.open() @@ -177,7 +176,8 @@ def test_IERS_B_builtin_agree_with_IERS_Auto_dX(): ) -@pytest.mark.skip +# This test checks for a bug that was in Astropy; is it fixed in the oldest version we support? +# @pytest.mark.skip def test_IERS_B_builtin_agree_with_IERS_Auto(): """The UT1-UTC, PM_X, and PM_Y values are correctly copied""" A = IERS_Auto.open() @@ -219,15 +219,18 @@ def test_IERS_B_builtin_agree_with_IERS_Auto(): ("PM_x", "PM_X_B"), ("PM_y", "PM_Y_B"), pytest.param( - "dX_2000A", "dX_2000A_B", marks=pytest.mark.xfail(reason="Bug in astropy") + "dX_2000A", + "dX_2000A_B", # marks=pytest.mark.xfail(reason="Bug in astropy") ), pytest.param( - "dY_2000A", "dY_2000A_B", marks=pytest.mark.xfail(reason="Bug in astropy") + "dY_2000A", + "dY_2000A_B", # marks=pytest.mark.xfail(reason="Bug in astropy") ), ] -@pytest.mark.skip +# This test checks for a bug that was in Astropy; is it fixed in the oldest version we support? +# @pytest.mark.skip @pytest.mark.parametrize("b_name,a_name", copy_columns) def test_IERS_B_parameters_loaded_into_IERS_Auto(b_name, a_name): A = IERS_Auto.open()