From 249b9c761d1fa0893740092df1d713ce0d91e856 Mon Sep 17 00:00:00 2001 From: Rachel Dowdall Date: Sat, 22 Mar 2014 14:39:33 +0000 Subject: Fixed broken math functions that return bool and added some more. --- tests/basics/math-fun-bool.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/basics/math-fun-bool.py (limited to 'tests/basics/math-fun-bool.py') 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)) -- cgit v1.2.3