summaryrefslogtreecommitdiffstatshomepage
path: root/tests/float/math-fun.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-20 01:50:49 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2014-06-20 18:00:23 +0300
commitf605172d2b595fc42cf55a5f7d4819abb0396fd2 (patch)
tree9aa7942234c9ed44b64211a46547f5f975d79f41 /tests/float/math-fun.py
parent3b6f7b95eb487fc927a3bc4644b1941cfbe2612b (diff)
downloadmicropython-f605172d2b595fc42cf55a5f7d4819abb0396fd2.tar.gz
micropython-f605172d2b595fc42cf55a5f7d4819abb0396fd2.zip
tests/float/: Skip tests if "math" module is not available.
Diffstat (limited to 'tests/float/math-fun.py')
-rw-r--r--tests/float/math-fun.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/float/math-fun.py b/tests/float/math-fun.py
index 7a37c58454..fa111e33e3 100644
--- a/tests/float/math-fun.py
+++ b/tests/float/math-fun.py
@@ -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]