Skip to content

Commit 201fa0e

Browse files
committed
Add parameterisation mean, min, max test cases
1 parent b6d1a1a commit 201fa0e

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

tests/test_models.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,4 +83,15 @@ def test_daily_min_string():
8383
"""Test for TypeError when passing strings"""
8484

8585
with pytest.raises(TypeError):
86-
error_expected = daily_min([['Hello', 'there'], ['General', 'Kenobi']])
86+
error_expected = daily_min([['Hello', 'there'], ['General', 'Kenobi']])
87+
88+
89+
@pytest.mark.parametrize(
90+
"test, expected",
91+
[
92+
([ [0, 0], [0, 0], [0, 0] ], [0, 0]),
93+
([ [1, 2], [3, 4], [5, 6] ], [3, 4]),
94+
])
95+
def test_daily_mean(test, expected):
96+
"""Test mean function works for array of zeroes and positive integers."""
97+
npt.assert_array_equal(daily_mean(np.array(test)), np.array(expected))

0 commit comments

Comments
 (0)