From 5ea770462e52d584a63ba2f6a6d40a3145f4092b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sipo=CC=8Bcz?= Date: Tue, 3 Jun 2025 20:31:00 -0700 Subject: [PATCH 1/3] MAINT: bumping minimum required pytest version --- astroquery/casda/tests/test_casda.py | 10 +++------- setup.cfg | 2 +- tox.ini | 2 +- 3 files changed, 5 insertions(+), 9 deletions(-) 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..807368059a 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 diff --git a/tox.ini b/tox.ini index b0fa7a9b44..f73954b96f 100644 --- a/tox.ini +++ b/tox.ini @@ -51,7 +51,7 @@ 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: regions==0.5 From 6c8a58b6aec522f3652799956a83e0e151c9a223 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Wed, 4 Jun 2025 11:58:23 -0700 Subject: [PATCH 2/3] =?UTF-8?q?TST:=20explicitly=20ignore=20coverage=20war?= =?UTF-8?q?ning,=20it=E2=80=99s=20likely=20triggered=20by=20another=20plug?= =?UTF-8?q?in=20but=20not=20clear=20yet=20which=20one=20(and=20it=20also?= =?UTF-8?q?=20doesn=E2=80=99t=20really=20matter).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.cfg | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.cfg b/setup.cfg index 807368059a..1c1112d300 100644 --- a/setup.cfg +++ b/setup.cfg @@ -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"') From d7cdfd77cb1ee3dacd17b143c34ef45101206685 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Brigitta=20Sip=C5=91cz?= Date: Wed, 4 Jun 2025 11:58:44 -0700 Subject: [PATCH 3/3] MAINT: fix minimum mocpy version in test config --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index f73954b96f..a4d1afdc5b 100644 --- a/tox.ini +++ b/tox.ini @@ -53,7 +53,7 @@ deps = oldestdeps: keyring==15.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