Skip to content

Commit

Permalink
use properties
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Oct 16, 2024
1 parent ecbd0e5 commit 40ce6b0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_variables.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
def test_variables():
z500 = Variable.from_dict("z500", {"mars": {"param": "z", "levtype": "pl", "levelist": 500}})

assert z500.is_pressure_level()
assert z500.level() == 500
assert z500.is_pressure_level
assert z500.level == 500

msl = Variable.from_dict("msl", {"mars": {"param": "msl", "levtype": "sfc"}})

assert not msl.is_pressure_level()
assert msl.level() is None
assert not msl.is_pressure_level
assert msl.level is None


if __name__ == "__main__":
Expand Down

0 comments on commit 40ce6b0

Please sign in to comment.