Skip to content

Commit

Permalink
Update test_stores.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gmaze committed Feb 15, 2023
1 parent 7a58a1a commit a0a0d67
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions argopy/tests/test_stores.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,25 +224,23 @@ def test_open_mfdataset(self):
)
)

@requires_connected_argovis
@safe_to_server_errors
def test_open_json(self):
uri = "https://argovis.colorado.edu/catalog/mprofiles/?ids=['6902746_12']"
uri = "http://api.ifremer.fr/argopy/data/ARGO-FULL.json"
fs = httpstore(timeout=OPTIONS['api_timeout'])
assert is_list_of_dicts(fs.open_json(uri))
assert isinstance(fs.open_json(uri), dict)

@requires_connected_argovis
@safe_to_server_errors
def test_open_mfjson(self):
fs = httpstore(timeout=OPTIONS['api_timeout'])
uri = [
"https://argovis.colorado.edu/catalog/mprofiles/?ids=['6902746_%i']" % i
for i in [12, 13]
"http://api.ifremer.fr/argopy/data/ARGO-FULL.json",
"http://api.ifremer.fr/argopy/data/ARGO-BGC.json",
]
for method in ["seq", "thread"]:
for progress in [True, False]:
lst = fs.open_mfjson(uri, method=method, progress=progress)
assert all(is_list_of_dicts(x) for x in lst)
assert is_list_of_dicts(lst)

@safe_to_server_errors
def test_read_csv(self):
Expand Down

0 comments on commit a0a0d67

Please sign in to comment.