-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add testing for ascending time step raise Value Error #300
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,12 @@ def test_semilagrangian(): | |
# result | ||
result = extrapolate(precip, velocity, num_timesteps) | ||
assert_array_almost_equal(result, expected) | ||
|
||
def test_ascending_time_step(): | ||
precip = np.ones((8, 8)) | ||
v = np.ones((8, 8)) | ||
velocity = np.stack([v, v]) | ||
|
||
not_ascending_timesteps = [1,2,3,5,4,6,7] | ||
with pytest.raises(ValueError): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. pytest module not imported.
|
||
extrapolate(precip, velocity, not_ascending_timesteps) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. End of line missing at line 30. You can fix this and any other format issue by running |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From the name of the function is not clear what is being tested.
What about:
test_not_ascending_timesteps_raise_exceptions