datatypes: fix serialisation for unlimited types

Change-Id: If2d972a35a6da872be8571e27ad4c1156b0a98f4
This commit is contained in:
Enrico Faulhaber
2017-07-10 17:04:13 +02:00
parent 7e03fd2d9d
commit 50fc67c818
2 changed files with 13 additions and 2 deletions

View File

@ -59,6 +59,9 @@ def test_FloatRange():
with pytest.raises(ValueError):
FloatRange('x','Y')
dt = FloatRange()
assert dt.as_json == ['double']
def test_IntRange():
dt = IntRange(-3, 3)
assert dt.as_json == ['int', -3, 3]
@ -76,6 +79,8 @@ def test_IntRange():
with pytest.raises(ValueError):
IntRange('xc','Yx')
dt = IntRange()
assert dt.as_json == ['int']
def test_EnumType():
# test constructor catching illegal arguments