Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ jobs:
- stage: behind Earthdata
script:
- export EARTHDATA_PASSWORD=$NSIDC_LOGIN
- pytest icepyx/tests/test_behind_NSIDC_API_login.py
- pytest --verbose icepyx/tests/test_behind_NSIDC_API_login.py
20 changes: 20 additions & 0 deletions doc/source/user_guide/documentation/classes_dev_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 22 additions & 9 deletions icepyx/tests/test_behind_NSIDC_API_login.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weiji14 If I'm understanding this right, we've added ATL14 as part of the fixture, but then don't actually run any tests on it beyond creating a query object with those parameters (in which case, shouldn't we just create a query object with it elsewhere instead of in test_behind_NSIDC_API_login.py). That or the assertions in lines 50-51 will fail because there's no appropriate json file for the ATL14 custom options...

Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,25 @@
# or is this an NSIDC level test so long as we verify the right info is submitted?


@pytest.fixture(scope="module")
def reg():
live_reg = ipx.Query(
"ATL06", [-55, 68, -48, 71], ["2019-02-22", "2019-02-28"], version="006"
)
yield live_reg
del live_reg
@pytest.fixture(
scope="module",
params=[
dict(
product="ATL14",
spatial_extent=[20, 79, 28, 80],
date_range=["2019-03-29", "2022-03-22"],
version="002",
),
dict(
product="ATL06",
spatial_extent=[-55, 68, -48, 71],
date_range=["2019-02-22", "2019-02-28"],
version="006",
),
],
)
def reg(request):
return ipx.Query(**request.param)


@pytest.fixture(scope="module")
Expand All @@ -37,8 +49,9 @@ def test_get_custom_options_output(session):
obs = is2ref._get_custom_options(session, "ATL06", "006")
with open("./icepyx/tests/ATL06v06_options.json") as exp_json:
exp = json.load(exp_json)
assert all(keys in obs.keys() for keys in exp.keys())
assert all(obs[key] == exp[key] for key in exp.keys())
for key in exp.keys():
assert key in obs.keys()
assert exp[key] == obs[key]


########## query module ##########
Expand Down