Skip to content

Commit

Permalink
Reinstate test_download_granules_without_subsetting
Browse files Browse the repository at this point in the history
Ensure that granules can be ordered from NSIDC and downloaded with the `subset=False` option. Need to check what the stdout and stderr strings are to get the test to pass.
  • Loading branch information
weiji14 committed Aug 22, 2024
1 parent 6c6366a commit 115ce4c
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions icepyx/tests/test_behind_NSIDC_API_login.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
"""
Integration tests that require authentication to Earthdata login.
"""

import json
import os
import pytest
Expand Down Expand Up @@ -49,8 +53,17 @@ def test_download_granules_with_subsetting(reg, session):
reg.download_granules(path)


# def test_download_granules_without_subsetting(reg_a, session):
# path = './downloads'
# reg_a.order_granules(session, subset=False)
# reg_a.download_granules(session, path)
# #check that the max extent of the downloaded granules isn't subsetted
def test_download_granules_without_subsetting(reg, session, capsys):

Check warning on line 56 in icepyx/tests/test_behind_NSIDC_API_login.py

View check run for this annotation

Codecov / codecov/patch

icepyx/tests/test_behind_NSIDC_API_login.py#L56

Added line #L56 was not covered by tests
"""
Test that granules can be ordered from NSIDC and downloaded with the `subset=False`
option.
"""
path = "./downloads"

Check warning on line 61 in icepyx/tests/test_behind_NSIDC_API_login.py

View check run for this annotation

Codecov / codecov/patch

icepyx/tests/test_behind_NSIDC_API_login.py#L61

Added line #L61 was not covered by tests

reg.order_granules(verbose=False, subset=False, email=False)
out, err = capsys.readouterr() # capture stdout and stderr
assert out == ""
assert err == ""

Check warning on line 66 in icepyx/tests/test_behind_NSIDC_API_login.py

View check run for this annotation

Codecov / codecov/patch

icepyx/tests/test_behind_NSIDC_API_login.py#L63-L66

Added lines #L63 - L66 were not covered by tests

reg.download_granules(path=path)

Check warning on line 68 in icepyx/tests/test_behind_NSIDC_API_login.py

View check run for this annotation

Codecov / codecov/patch

icepyx/tests/test_behind_NSIDC_API_login.py#L68

Added line #L68 was not covered by tests
# check that the max extent of the downloaded granules isn't subsetted

0 comments on commit 115ce4c

Please sign in to comment.