Commit 550bc93a authored by Samuel GAIST's avatar Samuel GAIST

[test] Moved all error related toolchains under their own user

This allows to have a cleaner content and a dedicated place for
error related tests.
parent 6510f357
{
"connections": [
{
"to": "echo1.in",
"from": "set.out",
"channel": "set"
},
{
"to": "echo2.in",
"from": "echo1.out",
"channel": "set"
},
{
"to": "analysis.in",
"from": "echo2.out",
"channel": "set"
}
],
"analyzers": [
{
"inputs": [
"in"
],
"synchronized_channel": "set",
"name": "analysis"
}
],
"datasets": [
{
"outputs": [
"out"
],
"name": "set"
}
],
"blocks": [
{
"inputs": [
"in"
],
"synchronized_channel": "set",
"name": "echo1",
"outputs": [
"out"
]
},
{
"inputs": [
"in"
],
"synchronized_channel": "set",
"name": "echo2",
"outputs": [
"out"
]
}
],
"representation": {
"connections": {
"set.out/echo1.in": [
{
"col": 4,
"row": 2
},
{
"col": 5,
"row": 2
},
{
"col": 6,
"row": 2
},
{
"col": 7,
"row": 2
}
],
"echo2.out/analysis.in": [
{
"col": 22,
"row": 2
},
{
"col": 23,
"row": 2
},
{
"col": 24,
"row": 2
},
{
"col": 25,
"row": 2
}
],
"echo1.out/echo2.in": [
{
"col": 13,
"row": 2
},
{
"col": 14,
"row": 2
},
{
"col": 15,
"row": 2
},
{
"col": 16,
"row": 2
}
]
},
"blocks": {
"set": {
"width": 5,
"height": 3,
"col": -1,
"row": 0
},
"analysis": {
"width": 6,
"height": 3,
"col": 25,
"row": 0
},
"echo2": {
"width": 6,
"height": 3,
"col": 16,
"row": 0
},
"echo1": {
"width": 6,
"height": 3,
"col": 7,
"row": 0
}
},
"channel_colors": {
"set": "#0000FF"
}
}
}
......@@ -55,42 +55,42 @@ def test_load_default():
def test_load_unknown_toolchain():
toolchain = Toolchain(prefix, "user/unknown/1")
toolchain = Toolchain(prefix, "errors/unknown/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "file not found"), 1)
def test_load_invalid_toolchain():
toolchain = Toolchain(prefix, "user/invalid/1")
toolchain = Toolchain(prefix, "errors/invalid/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "invalid JSON"), 1)
def test_load_toolchain_without_blocks_list():
toolchain = Toolchain(prefix, "user/missing_blocks/1")
toolchain = Toolchain(prefix, "errors/missing_blocks/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "'blocks' is a required property"), 1)
def test_load_toolchain_with_missing_block_name():
toolchain = Toolchain(prefix, "user/missing_block_name/1")
toolchain = Toolchain(prefix, "errors/missing_block_name/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "'name' is a required property"), 1)
def test_load_toolchain_with_missing_block_inputs():
toolchain = Toolchain(prefix, "user/missing_block_inputs/1")
toolchain = Toolchain(prefix, "errors/missing_block_inputs/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "'inputs' is a required property"), 1)
def test_load_toolchain_with_missing_block_outputs():
toolchain = Toolchain(prefix, "user/missing_block_outputs/1")
toolchain = Toolchain(prefix, "errors/missing_block_outputs/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "'outputs' is a required property"), 1
......@@ -99,7 +99,7 @@ def test_load_toolchain_with_missing_block_outputs():
def test_load_toolchain_without_datasets_list():
toolchain = Toolchain(prefix, "user/missing_datasets/1")
toolchain = Toolchain(prefix, "errors/missing_datasets/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "'datasets' is a required property"), 1
......@@ -108,14 +108,14 @@ def test_load_toolchain_without_datasets_list():
def test_load_toolchain_with_missing_dataset_name():
toolchain = Toolchain(prefix, "user/missing_dataset_name/1")
toolchain = Toolchain(prefix, "errors/missing_dataset_name/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "'name' is a required property"), 1)
def test_load_toolchain_with_missing_dataset_outputs():
toolchain = Toolchain(prefix, "user/missing_dataset_outputs/1")
toolchain = Toolchain(prefix, "errors/missing_dataset_outputs/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "'outputs' is a required property"), 1
......@@ -124,21 +124,21 @@ def test_load_toolchain_with_missing_dataset_outputs():
def test_load_toolchain_with_missing_connection_from():
toolchain = Toolchain(prefix, "user/missing_connection_from/1")
toolchain = Toolchain(prefix, "errors/missing_connection_from/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "'from' is a required property"), 1)
def test_load_toolchain_with_missing_connection_to():
toolchain = Toolchain(prefix, "user/missing_connection_to/1")
toolchain = Toolchain(prefix, "errors/missing_connection_to/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "'to' is a required property"), 1)
def test_load_toolchain_referencing_unknown_block_input():
toolchain = Toolchain(prefix, "user/unknown_block_input/1")
toolchain = Toolchain(prefix, "errors/unknown_block_input/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "invalid input endpoint 'addition.c'"), 1
......@@ -147,7 +147,7 @@ def test_load_toolchain_referencing_unknown_block_input():
def test_load_toolchain_referencing_unknown_dataset_output():
toolchain = Toolchain(prefix, "user/unknown_dataset_output/1")
toolchain = Toolchain(prefix, "errors/unknown_dataset_output/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "invalid output endpoint 'integers.timestamps'"),
......@@ -157,7 +157,7 @@ def test_load_toolchain_referencing_unknown_dataset_output():
def test_load_toolchain_referencing_unknown_block_output():
toolchain = Toolchain(prefix, "user/unknown_block_output/1")
toolchain = Toolchain(prefix, "errors/unknown_block_output/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "invalid output endpoint 'addition.unknown'"), 1
......@@ -166,7 +166,7 @@ def test_load_toolchain_referencing_unknown_block_output():
def test_load_toolchain_referencing_unknown_analyzer_input():
toolchain = Toolchain(prefix, "user/unknown_analyzer_input/1")
toolchain = Toolchain(prefix, "errors/unknown_analyzer_input/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "invalid input endpoint 'analysis.unknown'"), 1
......@@ -175,7 +175,7 @@ def test_load_toolchain_referencing_unknown_analyzer_input():
def test_load_toolchain_unconnected_input():
toolchain = Toolchain(prefix, "user/unconnected_input/1")
toolchain = Toolchain(prefix, "errors/unconnected_input/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(
count_errors(toolchain.errors, "input(s) `addition.b' remain unconnected"), 1
......@@ -184,6 +184,6 @@ def test_load_toolchain_unconnected_input():
def test_load_toolchain_double_connected_input():
toolchain = Toolchain(prefix, "user/double_connected_input/1")
toolchain = Toolchain(prefix, "errors/double_connected_input/1")
nose.tools.assert_false(toolchain.valid)
nose.tools.eq_(count_errors(toolchain.errors, "ending on the same input as"), 1)
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