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

pull/711/head
Paul Sokolovsky 2014-06-20 01:50:49 +03:00
rodzic 3b6f7b95eb
commit f605172d2b
2 zmienionych plików z 12 dodań i 2 usunięć

Wyświetl plik

@ -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')]

Wyświetl plik

@ -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]