-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix warning Day.delta is deprecated (#713)
- Loading branch information
1 parent
67392f3
commit c7b2b58
Showing
2 changed files
with
24 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import pastas as ps | ||
import pytest | ||
|
||
|
||
def test_frequency_is_supported(): | ||
ps.ts._frequency_is_supported("D") | ||
ps.ts._frequency_is_supported("7D") | ||
with pytest.raises(Exception): | ||
ps.ts._frequency_is_supported("SMS") | ||
|
||
|
||
def test_get_stress_dt(): | ||
assert ps.ts._get_stress_dt("D") == 1.0 | ||
assert ps.ts._get_stress_dt("7D") == 7.0 | ||
assert ps.ts._get_stress_dt("W") == 7.0 | ||
assert ps.ts._get_stress_dt("SMS") == 15.0 |