Skip to content

Commit

Permalink
Add context to to_wind_rose test comments
Browse files Browse the repository at this point in the history
  • Loading branch information
paulf81 committed Jan 18, 2024
1 parent 2e765b1 commit 41af717
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions tests/wind_data_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class ChildClassTest(WindDataBase):
def __init__(self):
pass


def test_bad_inheritance():
"""
Verifies that a child class of WindDataBase must implement the unpack method.
Expand Down Expand Up @@ -115,10 +116,7 @@ def test_wind_rose_unpack():

# Now test computing 0-freq cases too
wind_rose = WindRose(
wind_directions,
wind_speeds,
freq_table,
compute_zero_freq_occurrence=True
wind_directions, wind_speeds, freq_table, compute_zero_freq_occurrence=True
)

(
Expand Down Expand Up @@ -204,8 +202,8 @@ def test_time_series_to_wind_rose():
assert freq_table.shape[0] == 3
assert freq_table.shape[1] == 1

# The frequencies should [2/3, 0, 1/3]
# TODO this one I dont follow, @paul or @misha?
# The frequencies should [2/3, 0, 1/3] given that 2 of the data points
# fall in the 260 deg bin, 0 in the 262 deg bin and 1 in the 264 deg bin
assert np.allclose(freq_table.squeeze(), [2 / 3, 0, 1 / 3])

# Test just 2 wind speeds
Expand Down

0 comments on commit 41af717

Please sign in to comment.