Skip to content

Commit

Permalink
Mark tests which depend on ECS/EGI as expected fail; separate integra…
Browse files Browse the repository at this point in the history
…tion and unit tests (#609)
  • Loading branch information
mfisher87 authored Sep 26, 2024
1 parent 0f2cfeb commit 74ca632
Show file tree
Hide file tree
Showing 23 changed files with 339 additions and 279 deletions.
4 changes: 1 addition & 3 deletions .github/workflows/integration_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ jobs:
EARTHDATA_PASSWORD: "${{ secrets.EARTHDATA_PASSWORD }}"
NSIDC_LOGIN: "${{ secrets.EARTHDATA_PASSWORD }}"
run: |
pytest icepyx/ --verbose --cov app \
icepyx/tests/test_behind_NSIDC_API_login.py \
icepyx/tests/test_auth.py
pytest icepyx/tests/integration --verbose --cov app
- name: "Upload coverage report"
uses: "codecov/[email protected]"
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ jobs:
- name: "Run tests"
run: |
pytest icepyx/ --verbose --cov app \
--ignore=icepyx/tests/test_behind_NSIDC_API_login.py \
--ignore=icepyx/tests/test_auth.py
--ignore=icepyx/tests/integration
- name: "Upload coverage report"
uses: "codecov/[email protected]"
Expand Down
226 changes: 125 additions & 101 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.
172 changes: 98 additions & 74 deletions doc/source/user_guide/documentation/classes_user_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
192 changes: 99 additions & 93 deletions doc/source/user_guide/documentation/packages_user_uml.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file removed icepyx/tests/__init__.py
Empty file.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,15 @@
import icepyx as ipx
import icepyx.core.is2ref as is2ref

# Skip the whole module. See:
# https://docs.pytest.org/en/stable/reference/reference.html#globalvar-pytestmark
pytestmark = pytest.mark.xfail(
reason=(
"The back-end API on which these tests depend, ECS/EGI/ESI, is scheduled for"
" shutdown in late 2024. At that point, these tests will begin failing."
)
)

# Misc notes and needed tests
# test avail data and subsetting success for each input type
# (kml, shp, list of coords, bbox)
Expand Down Expand Up @@ -40,7 +49,7 @@ def session(reg):

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:
with open("./icepyx/tests/integration/ATL06v06_options.json") as exp_json:
exp = json.load(exp_json)
assert all(keys in obs for keys in exp)
assert all(obs[key] == exp[key] for key in exp)
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions icepyx/tests/test_read.py → icepyx/tests/unit/test_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ def test_parse_source_no_files():
( # check list input
[
"./icepyx/core/is2ref.py",
"./icepyx/tests/test_is2class_query.py",
"./icepyx/tests/unit/test_is2class_query.py",
],
sorted(
[
"./icepyx/core/is2ref.py",
"./icepyx/tests/test_is2class_query.py",
"./icepyx/tests/unit/test_is2class_query.py",
]
),
),
Expand All @@ -49,8 +49,8 @@ def test_parse_source_no_files():
sorted(
[
"./icepyx/core/is2ref.py",
"./icepyx/tests/test_is2class_query.py",
"./icepyx/tests/test_is2ref.py",
"./icepyx/tests/unit/test_is2class_query.py",
"./icepyx/tests/unit/test_is2ref.py",
]
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ def test_bad_poly_inputfile_name_throws_error():

def test_bad_poly_inputfile_type_throws_error():
with pytest.raises(TypeError):
spat.Spatial(str(Path("./icepyx/tests/test_read.py").resolve()))
spat.Spatial(str(Path("./icepyx/tests/unit/test_read.py").resolve()))


########## geodataframe ##########
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 74ca632

Please sign in to comment.