Skip to content

Commit 5b4ffe6

Browse files
authored
Merge pull request #3337 from bsipocz/MAINT_bump_minpytest
MAINT: bumping minimum required pytest version and fixes coverage job
2 parents 960ddec + d7cdfd7 commit 5b4ffe6

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

astroquery/casda/tests/test_casda.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,8 @@
1111
import astropy.units as u
1212
from astropy.table import Table, Column
1313
from astropy.io.votable import parse
14-
from astropy.io.votable.exceptions import W03, W06, W50
14+
from astropy.io.votable.exceptions import W03, W50
1515
from astroquery import log
16-
from astroquery.utils.commons import ASTROPY_LT_5_3
17-
from contextlib import nullcontext
1816

1917
import numpy as np
2018

@@ -274,10 +272,8 @@ def test_query_region_async_box(patch_get):
274272

275273

276274
def test_filter_out_unreleased():
277-
# The ``W06: Invalid UCD 'meta.ref.url;meta.curation'`` warning is only raised with older astropy
278-
with pytest.warns(W06) if ASTROPY_LT_5_3 else nullcontext():
279-
with pytest.warns(W03):
280-
all_records = parse(data_path('partial_unreleased.xml'), verify='warn').get_first_table().to_table()
275+
with pytest.warns(W03):
276+
all_records = parse(data_path('partial_unreleased.xml'), verify='warn').get_first_table().to_table()
281277
assert all_records[0]['obs_release_date'] == '2017-08-02T03:51:19.728Z'
282278
assert all_records[1]['obs_release_date'] == '2218-01-02T16:51:00.728Z'
283279
assert all_records[2]['obs_release_date'] == ''

setup.cfg

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ upload-dir = docs/_build/html
3535
show-response = 1
3636

3737
[tool:pytest]
38-
minversion = 6.0
38+
minversion = 7.4
3939
norecursedirs = build docs/_build astroquery/irsa astroquery/nasa_exoplanet_archive astroquery/ned astroquery/ibe astroquery/irsa_dust astroquery/cds astroquery/sha astroquery/dace
4040
testpaths = astroquery docs
4141
doctest_plus = enabled
@@ -89,6 +89,9 @@ filterwarnings =
8989
ignore: The 'strip_cdata' option of HTMLParser:DeprecationWarning
9090
# Triggered in mast, likely boto related
9191
ignore:datetime.datetime.utcnow\(\) is deprecated:DeprecationWarning
92+
# CoverageWarnings triggered by one of the other plugins(?). Either case, explicitely
93+
# ignore it here to have passing test for pytest 8.4.
94+
ignore:Module astroquery was previously imported, but not measured:coverage.exceptions.CoverageWarning
9295

9396
markers =
9497
bigdata: marks tests that are expected to trigger a large download (deselect with '-m "not bigdata"')

tox.ini

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ deps =
5151
oldestdeps: pytest-doctestplus==0.13
5252
oldestdeps: requests==2.25
5353
oldestdeps: keyring==15.0
54-
oldestdeps: pytest==6.0
54+
oldestdeps: pytest==7.4
5555
oldestdeps: beautifulsoup4==4.9
56-
oldestdeps-alldeps: mocpy==0.9
56+
oldestdeps-alldeps: mocpy==0.12
5757
oldestdeps-alldeps: regions==0.5
5858

5959
online: pytest-custom_exit_code

0 commit comments

Comments
 (0)