Skip to content
Snippets Groups Projects
Commit a0cbc108 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tests/float: Make various tests skippable.

parent 98314440
No related branches found
No related tags found
No related merge requests found
# test construction of array from array with float type # test construction of array from array with float type
try:
from array import array 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])))
# 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))
......
try:
from array import array from array import array
except ImportError:
import sys
print("SKIP")
sys.exit()
def test(a): def test(a):
print(a) print(a)
......
# test struct package with floats # test struct package with floats
try:
try: try:
import ustruct as struct import ustruct as struct
except: except:
import struct 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment