Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zoghbi-a committed Oct 18, 2024
1 parent 91bd43a commit afa7ba2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
9 changes: 5 additions & 4 deletions astroquery/heasarc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,11 @@ def tables(self, *, master=False, keywords=None):
`~astropy.table.Table` with columns: name, description
"""
if not isinstance(keywords, list):
keywords = [keywords]
if not all([isinstance(wrd, str) for wrd in keywords]):
raise ValueError('non-str found in keywords elements')
if keywords is not None:
if not isinstance(keywords, list):
keywords = [keywords]
if not all([isinstance(wrd, str) for wrd in keywords]):
raise ValueError('non-str found in keywords elements')

# use 'mast' to include both 'master' and 'mastr'
names, desc = [], []
Expand Down
6 changes: 3 additions & 3 deletions astroquery/heasarc/tests/test_heasarc_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,16 @@
@pytest.mark.remote_data
class TestHeasarc:

def test_tap():
def test_tap(self):
"""Test Tap service"""
assert Heasarc._tap is None
tap = Heasarc.tap
assert Heasarc._tap == tap

def test_meta():
def test_meta(self):
"""Test Meta service"""
assert Heasarc._meta_info is None
Heasarc._meta()
Heasarc._meta
assert Heasarc._meta_info is not None

@pytest.mark.parametrize("coordinates", OBJ_LIST)
Expand Down

0 comments on commit afa7ba2

Please sign in to comment.