File tree Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Expand file tree Collapse file tree 3 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 20
20
21
21
# Licensed under a 3-clause BSD style license - see LICENSE.rst
22
22
import warnings
23
+ from astropy .utils .exceptions import AstropyDeprecationWarning
24
+
23
25
24
26
warnings .warn ("The ``cds`` module has been moved to astroquery.mocserver, "
25
27
"and ``CdsClass`` has been renamed to ``MOCServerClass``. "
26
- "Please update your imports." , DeprecationWarning , stacklevel = 2 )
28
+ "Please update your imports." , AstropyDeprecationWarning , stacklevel = 2 )
27
29
28
30
from astroquery .mocserver import MOCServer as cds
29
31
from astroquery .mocserver import MOCServerClass as CdsClass
Original file line number Diff line number Diff line change 1
1
import pytest
2
+ from astropy .utils .exceptions import AstropyDeprecationWarning
2
3
3
4
4
5
def test_raises_deprecation_warning ():
5
6
with pytest .raises (
6
- DeprecationWarning ,
7
+ AstropyDeprecationWarning ,
7
8
match = "The ``cds`` module has been moved to astroquery.mocserver, "
8
9
"and ``CdsClass`` has been renamed to ``MOCServerClass``. "
9
10
"Please update your imports." ):
Original file line number Diff line number Diff line change @@ -58,12 +58,14 @@ filterwarnings =
58
58
ignore:Experimental. Fermi-LAT:UserWarning
59
59
ignore:Experimental. SHA:UserWarning
60
60
ignore:Experimental. OGLE:UserWarning:
61
- # Warnings from deprecated or known-to-be-broken modules
62
- ignore:The legacy NRAO archive this module uses has been retired:UserWarning
61
+ # Warnings from deprecated or known-to-be-broken modules. They have to be listed to make test collection work,
62
+ # Can be removed once the modules are removed.
63
63
ignore:vamdclib could not be imported; the vamdc astroquery module will not work:UserWarning
64
64
ignore:the vamdc astroquery module:astropy.utils.exceptions.AstropyDeprecationWarning
65
65
# Leap second update related warning
66
66
ignore:leap-second auto-update failed:astropy.utils.exceptions.AstropyWarning
67
+
68
+
67
69
# Should ignore these for astropy<5.0
68
70
ignore:getName|currentThread:DeprecationWarning:astropy
69
71
markers =
You can’t perform that action at this time.
0 commit comments