Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
f605172d
Commit
f605172d
authored
Jun 20, 2014
by
Paul Sokolovsky
Browse files
tests/float/: Skip tests if "math" module is not available.
parent
3b6f7b95
Changes
2
Hide whitespace changes
Inline
Side-by-side
tests/float/math-fun-bool.py
View file @
f605172d
# 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'
)]
...
...
tests/float/math-fun.py
View file @
f605172d
# 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
]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment