Commit 8e21f16c authored by Jaden's avatar Jaden Committed by Samuel GAIST

[dataformat] fix complex types & add test

parent b02ca44d
......@@ -46,6 +46,7 @@
{ "type": "integer" },
{
"oneOf": [
{ "$ref": "#/definitions/complextype" },
{ "$ref": "../common/1.json#/definitions/basetype" },
{ "$ref": "../common/1.json#/definitions/reference" },
{ "$ref": "#" }
......@@ -64,6 +65,7 @@
{ "type": "integer" },
{
"oneOf": [
{ "$ref": "#/definitions/complextype" },
{ "$ref": "../common/1.json#/definitions/basetype" },
{ "$ref": "../common/1.json#/definitions/reference" },
{ "$ref": "#" }
......@@ -83,6 +85,7 @@
{ "type": "integer" },
{
"oneOf": [
{ "$ref": "#/definitions/complextype" },
{ "$ref": "../common/1.json#/definitions/basetype" },
{ "$ref": "../common/1.json#/definitions/reference" },
{ "$ref": "#" }
......@@ -103,6 +106,7 @@
{ "type": "integer" },
{
"oneOf": [
{ "$ref": "#/definitions/complextype" },
{ "$ref": "../common/1.json#/definitions/basetype" },
{ "$ref": "../common/1.json#/definitions/reference" },
{ "$ref": "#" }
......@@ -124,6 +128,7 @@
{ "type": "integer" },
{
"oneOf": [
{ "$ref": "#/definitions/complextype" },
{ "$ref": "../common/1.json#/definitions/basetype" },
{ "$ref": "../common/1.json#/definitions/reference" },
{ "$ref": "#" }
......
{
"#description": "A dataformat with complex types",
"param_complex_64": "complex64",
"param_complex_128": "complex128",
"complex_array": [
0,
0,
"complex64"
]
}
......@@ -167,6 +167,12 @@ def test_load_indirect_recursion():
)
def test_load_complex():
"""tests that the system accepts complex types in dataformats"""
df = DataFormat(prefix, "user/complex/1")
nose.tools.assert_true(df.valid, "\n * %s" % "\n * ".join(df.errors))
@nose.tools.with_setup(teardown=cleanup)
def test_export():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment