diff options
author | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:25:55 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-03-22 20:25:55 +0000 |
commit | 365274da13cc701e3e8f6c72a24dd4eb4083a88d (patch) | |
tree | 110170545eae9de4a584f08dd34d259cef0b70a0 /tests/basics/math-fun-bool.py | |
parent | 0119fc7532c573bd596fb6173b4d36ef5260027a (diff) | |
parent | a6d53188b7db85af9dc93186e4f36b7009084ea6 (diff) |
Merge branch 'master' of github.com:micropython/micropython
Diffstat (limited to 'tests/basics/math-fun-bool.py')
-rw-r--r-- | tests/basics/math-fun-bool.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/basics/math-fun-bool.py b/tests/basics/math-fun-bool.py new file mode 100644 index 000000000..cf718d4b8 --- /dev/null +++ b/tests/basics/math-fun-bool.py @@ -0,0 +1,12 @@ +# Test the bool functions from math + +from math import isfinite, isnan, isinf + +test_values = [1, 0, -1, 1.0, 0.0, -1.0, float('NaN'), float('Inf'), + -float('NaN'), -float('Inf')] + +functions = [isfinite, isnan, isinf] + +for val in test_values: + for f in functions: + print(f(val)) |