Skip to content

Commit c47e391

Browse files
committed
Apply WCS warnings filter at test level
1 parent 8851462 commit c47e391

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

astroquery/astrometry_net/tests/test_astrometry_net_remote.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def _calculate_wcs_separation_at_points(wcses, center, extent):
6363
return result_location.separation(expected_location)
6464

6565

66+
@pytest.mark.filterwarnings("ignore:The WCS transformation has more axes:astropy.wcs.wcs.FITSFixedWarning")
6667
@pytest.mark.skipif(not api_key, reason='API key not set.')
6768
@pytest.mark.remote_data
6869
def test_solve_by_source_list():
@@ -92,6 +93,7 @@ def test_solve_by_source_list():
9293
assert (separations.arcsec).max() < 0.1
9394

9495

96+
@pytest.mark.filterwarnings("ignore:The WCS transformation has more axes:astropy.wcs.wcs.FITSFixedWarning")
9597
@pytest.mark.skipif(not api_key, reason='API key not set.')
9698
@pytest.mark.remote_data
9799
def test_solve_image_upload():
@@ -138,6 +140,7 @@ def test_solve_image_upload_expected_failure():
138140
assert not result
139141

140142

143+
@pytest.mark.filterwarnings("ignore:The WCS transformation has more axes:astropy.wcs.wcs.FITSFixedWarning")
141144
@pytest.mark.skipif(not api_key, reason='API key not set.')
142145
@pytest.mark.skipif(not _HAVE_SOURCE_DETECTION,
143146
reason='photutils not installed')

setup.cfg

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,6 @@ filterwarnings =
6767
ignore:leap-second auto-update failed:astropy.utils.exceptions.AstropyWarning
6868
# Should ignore these for astropy<5.0
6969
ignore:getName|currentThread:DeprecationWarning:astropy
70-
# Ignore errors from astropy.wcs about the number of WCS axes not matching image dimension
71-
ignore:The WCS transformation has more axes:astropy.wcs.wcs.FITSFixedWarning
7270
markers =
7371
bigdata: marks tests that are expected to trigger a large download (deselect with '-m "not bigdata"')
7472
noautofixt: disabling fixture autouse

0 commit comments

Comments
 (0)