diff --git a/astroquery/casda/tests/test_casda.py b/astroquery/casda/tests/test_casda.py index 79870035cc..ccd56fcc7f 100644 --- a/astroquery/casda/tests/test_casda.py +++ b/astroquery/casda/tests/test_casda.py @@ -11,10 +11,8 @@ import astropy.units as u from astropy.table import Table, Column from astropy.io.votable import parse -from astropy.io.votable.exceptions import W03, W06, W50 +from astropy.io.votable.exceptions import W03, W50 from astroquery import log -from astroquery.utils.commons import ASTROPY_LT_5_3 -from contextlib import nullcontext import numpy as np @@ -274,10 +272,8 @@ def test_query_region_async_box(patch_get): def test_filter_out_unreleased(): - # The ``W06: Invalid UCD 'meta.ref.url;meta.curation'`` warning is only raised with older astropy - with pytest.warns(W06) if ASTROPY_LT_5_3 else nullcontext(): - with pytest.warns(W03): - all_records = parse(data_path('partial_unreleased.xml'), verify='warn').get_first_table().to_table() + with pytest.warns(W03): + all_records = parse(data_path('partial_unreleased.xml'), verify='warn').get_first_table().to_table() assert all_records[0]['obs_release_date'] == '2017-08-02T03:51:19.728Z' assert all_records[1]['obs_release_date'] == '2218-01-02T16:51:00.728Z' assert all_records[2]['obs_release_date'] == '' diff --git a/setup.cfg b/setup.cfg index 7db77eb3c8..1c1112d300 100644 --- a/setup.cfg +++ b/setup.cfg @@ -35,7 +35,7 @@ upload-dir = docs/_build/html show-response = 1 [tool:pytest] -minversion = 6.0 +minversion = 7.4 norecursedirs = build docs/_build astroquery/irsa astroquery/nasa_exoplanet_archive astroquery/ned astroquery/ibe astroquery/irsa_dust astroquery/cds astroquery/sha astroquery/dace testpaths = astroquery docs doctest_plus = enabled @@ -89,6 +89,9 @@ filterwarnings = ignore: The 'strip_cdata' option of HTMLParser:DeprecationWarning # Triggered in mast, likely boto related ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning +# CoverageWarnings triggered by one of the other plugins(?). Either case, explicitely +# ignore it here to have passing test for pytest 8.4. + ignore:Module astroquery was previously imported, but not measured:coverage.exceptions.CoverageWarning markers = bigdata: marks tests that are expected to trigger a large download (deselect with '-m "not bigdata"') diff --git a/tox.ini b/tox.ini index b0fa7a9b44..a4d1afdc5b 100644 --- a/tox.ini +++ b/tox.ini @@ -51,9 +51,9 @@ deps = oldestdeps: pytest-doctestplus==0.13 oldestdeps: requests==2.25 oldestdeps: keyring==15.0 - oldestdeps: pytest==6.0 + oldestdeps: pytest==7.4 oldestdeps: beautifulsoup4==4.9 - oldestdeps-alldeps: mocpy==0.9 + oldestdeps-alldeps: mocpy==0.12 oldestdeps-alldeps: regions==0.5 online: pytest-custom_exit_code