tests/float/: Skip tests if "math" module is not available.
This commit is contained in:
parent
3b6f7b95eb
commit
f605172d2b
|
@ -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')]
|
||||
|
|
|
@ -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]
|
||||
|
|
Loading…
Reference in New Issue