summaryrefslogtreecommitdiff
path: root/tests/float/math_fun_bool.py
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-07-05 06:14:29 +0100
committerDamien George <damien.p.george@gmail.com>2014-07-05 06:14:29 +0100
commit539681fffd96082ca3b5d18643d4f08f65c47170 (patch)
tree7e6f8332c6e7737b768750e67265bb02b22932e6 /tests/float/math_fun_bool.py
parent0182385ab0b4a1b2e549c92f8f5b621135aeb975 (diff)
tests: Rename test scripts, changing - to _ for consistency.
From now on, all new tests must use underscore. Addresses issue #727.
Diffstat (limited to 'tests/float/math_fun_bool.py')
-rw-r--r--tests/float/math_fun_bool.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/float/math_fun_bool.py b/tests/float/math_fun_bool.py
new file mode 100644
index 000000000..57232857a
--- /dev/null
+++ b/tests/float/math_fun_bool.py
@@ -0,0 +1,17 @@
+# Test the bool functions from math
+
+try:
+ from math import isfinite, isnan, isinf
+except ImportError:
+ print("SKIP")
+ import sys
+ sys.exit()
+
+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))