File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 33import json
44import os
55import re
6+ import warnings
67from shutil import copyfile
78from unittest .mock import patch
89
@@ -646,11 +647,9 @@ def test_resolve_object_multi(patch_post):
646647 assert isinstance (obj_dict ["SIMBAD" ], SkyCoord )
647648
648649 # Error if none of the objects can be resolved
649- with pytest .warns (InputWarning , match = 'Could not resolve "nonexisting1" to a sky position.' ):
650- with pytest .warns (InputWarning , match = 'Could not resolve "nonexisting2" to a sky position.' ):
651- with pytest .raises (ResolverError , match = 'Could not resolve any of the given object names to '
652- 'sky positions.' ):
653- mast .Mast .resolve_object (["nonexisting1" , "nonexisting2" ])
650+ warnings .simplefilter ("ignore" , category = InputWarning ) # ignore warnings
651+ with pytest .raises (ResolverError , match = 'Could not resolve any of the given object names to sky positions.' ):
652+ mast .Mast .resolve_object (["nonexisting1" , "nonexisting2" ])
654653
655654
656655def test_login_logout (patch_post ):
You can’t perform that action at this time.
0 commit comments