tests/float/: Skip tests if "math" module is not available.

This commit is contained in:
Paul Sokolovsky 2014-06-20 01:50:49 +03:00
parent 3b6f7b95eb
commit f605172d2b
2 changed files with 12 additions and 2 deletions

View File

@ -1,6 +1,11 @@
# Test the bool functions from math
from math import isfinite, isnan, isinf
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')]

View File

@ -1,6 +1,11 @@
# Tests the functions imported from math
from math import *
try:
from math import *
except ImportError:
print("SKIP")
import sys
sys.exit()
test_values = [-100., -1.23456, -1, -0.5, 0.0, 0.5, 1.23456, 100.]
p_test_values = [0.1, 0.5, 1.23456]