Browse Source

tests/float: Make various tests skippable.

pull/2587/merge
Paul Sokolovsky 8 years ago
parent
commit
a0cbc108ba
  1. 7
      tests/float/array_construct.py
  2. 7
      tests/float/builtin_float_minmax.py
  3. 7
      tests/float/float_array.py
  4. 12
      tests/float/float_struct.py

7
tests/float/array_construct.py

@ -1,6 +1,11 @@
# test construction of array from array with float type # test construction of array from array with float type
from array import array try:
from array import array
except ImportError:
import sys
print("SKIP")
sys.exit()
print(array('f', array('h', [1, 2]))) print(array('f', array('h', [1, 2])))
print(array('d', array('f', [1, 2]))) print(array('d', array('f', [1, 2])))

7
tests/float/builtin_float_minmax.py

@ -1,4 +1,11 @@
# test builtin min and max functions with float args # test builtin min and max functions with float args
try:
min
max
except:
import sys
print("SKIP")
sys.exit()
print(min(0,1.0)) print(min(0,1.0))
print(min(1.0,0)) print(min(1.0,0))

7
tests/float/float_array.py

@ -1,4 +1,9 @@
from array import array try:
from array import array
except ImportError:
import sys
print("SKIP")
sys.exit()
def test(a): def test(a):
print(a) print(a)

12
tests/float/float_struct.py

@ -1,9 +1,13 @@
# test struct package with floats # test struct package with floats
try: try:
import ustruct as struct try:
except: import ustruct as struct
import struct except:
import struct
except ImportError:
import sys
print("SKIP")
sys.exit()
i = 1. + 1/2 i = 1. + 1/2
# TODO: it looks like '=' format modifier is not yet supported # TODO: it looks like '=' format modifier is not yet supported

Loading…
Cancel
Save