Skip to content

Commit

Permalink
more tests for the normalizing function
Browse files Browse the repository at this point in the history
  • Loading branch information
paulalndwhr committed Oct 14, 2023
1 parent 2995ba6 commit 09c847b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ def f(x): return 1
@pytest.mark.parametrize("test_function,test_domain,argument,expected", [
(uniform, [0, 1], 0, 1.0),
(uniform, [0, 1], 0.5, 1.0),
(uniform, [0, 1], 1, 1.0)
(uniform, [0, 1], 1, 1.0),
(lambda x: x, [0, 1], 0, 0),
(lambda x: x, [0, 1], 0.5, 1),
(lambda x: x, [0, 1], 1, 2),
])
def test_normalize(test_function, test_domain, argument, expected):
assert normalize(test_function, test_domain)(argument) == expected

0 comments on commit 09c847b

Please sign in to comment.