@pytest.mark.parametrize('func, expected', [(bad_input_type_node, '`inputs` type must be one of '), (bad_output_type_node, '`outputs` type must be one of '), (bad_function_type_node, 'first argument must be a function'), (no_input_or_output_node, 'it must have some `inputs` or `outputs`'), (input_same_as_output_node, "A node cannot have the same inputs and outputs: {\\'A\\'}"), (duplicate_output_dict_node, "Failed to create node identity\\(\\[A\\]\\) -> \\[A,A\\] due to duplicate output\\(s\\) {\\'A\\'}."), (duplicate_output_list_node, "Failed to create node identity\\(\\[A\\]\\) -> \\[A,A\\] due to duplicate output\\(s\\) {\\'A\\'}.")])
def test_bad_node(func, expected):
    with pytest.raises(ValueError, match=expected):
        node(*func())
@pytest.mark.parametrize('func, expected', [(bad_input_type_node, '`inputs` type must be one of '), (bad_output_type_node, '`outputs` type must be one of '), (bad_function_type_node, 'first argument must be a function'), (no_input_or_output_node, 'it must have some `inputs` or `outputs`'), (input_same_as_output_node, "A node cannot have the same inputs and outputs: {\\'A\\'}"), (duplicate_output_dict_node, "Failed to create node identity\\(\\[A\\]\\) -> \\[A,A\\] due to duplicate output\\(s\\) {\\'A\\'}."), (duplicate_output_list_node, "Failed to create node identity\\(\\[A\\]\\) -> \\[A,A\\] due to duplicate output\\(s\\) {\\'A\\'}.")])
def test_bad_node(func, expected):
    with pytest.raises(ValueError, match=expected):
        node(*func())