Skip to content

Commit

Permalink
Add test for setting invalid rmw fill
Browse files Browse the repository at this point in the history
  • Loading branch information
SorooshMani-NOAA committed Aug 22, 2024
1 parent f926078 commit b65278c
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_nhc.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,28 @@ def test_rmw_fill_method_regression_penny_2023():
assert len(rmw.unique()) > 1


def test_rmw_fill_method_setvalue_invalid():
tr_florence2018 = VortexTrack.from_storm_name(
"Florence",
2018,
file_deck="a",
advisories=["OFCL"],
rmw_fill=RMWFillMethod.regression_penny_2023,
)

assert tr_florence2018.rmw_fill == RMWFillMethod.regression_penny_2023

# Note str is NOT acceptable
tr_florence2018.rmw_fill = "persistent"
assert tr_florence2018.rmw_fill == RMWFillMethod.none

tr_florence2018.rmw_fill = 1
assert tr_florence2018.rmw_fill == RMWFillMethod.none

tr_florence2018.rmw_fill = None
assert tr_florence2018.rmw_fill == RMWFillMethod.none


def test_rmw_fill_method_set_after_creation():
tr_florence2018 = VortexTrack.from_storm_name(
"Florence",
Expand Down

0 comments on commit b65278c

Please sign in to comment.