Skip to content

Commit 0b89749

Browse files
committed
changelog entry
fix obvious typo remove unused import apparently I had comment row 0 wrong? add some comments in case the remote test fails for good reason in the future [ci skip]
1 parent 8843eb9 commit 0b89749

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

CHANGES.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ casda
8181
- Use the standard ``login`` method for authenticating, which supports the system
8282
keyring [#2386]
8383

84+
heasarc
85+
^^^^^^^
86+
87+
- Fix issue 2560 in which blank tables raised exceptions [#2624]
88+
8489
ipac.nexsci.nasa_exoplanet_archive
8590
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8691

astroquery/heasarc/tests/test_heasarc_remote.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import pytest
44
import requests
5-
import warnings
65

76
from ...heasarc import Heasarc
87

@@ -109,11 +108,16 @@ def test_query_region_nohits(self):
109108
"""
110109
heasarc = Heasarc()
111110

112-
with warnings.catch_warnings(record=True) as warn:
113111
with pytest.warns(NoResultsWarning, match='No matching rows were found in the query.'):
112+
# This was an example coordinate that returned nothing
113+
# Since Fermi is still active, it is possible that sometime in the
114+
# future an event will occur here.
114115
table = heasarc.query_region(
115116
SkyCoord(0.28136*u.deg, -0.09789*u.deg, frame='fk5'),
116117
mission='fermilpsc', radius=0.1*u.deg)
117118

118119
assert len(table) == 0
119-
assert 'heasarc_fermigbrst' in table.meta['COMMENT'][0]
120+
# this is to check that the header comments got parsed correctly
121+
# I'm not certain that they will always be returned in the same order,
122+
# so it may be necessary in the future to change this part of the test
123+
assert 'heasarc_fermilpsc' in table.meta['COMMENT'][0]

0 commit comments

Comments
 (0)