@pytest.mark.parametrize('enum_str, enum_dict, enum_label', (('enum Animal(0="Dog", 1="Cat", 2="Fox")', {'Animal': {0: 'Dog', 1: 'Cat', 2: 'Fox'}}, 'Simple enum'), ('enum Animal(0="Dog", //A Comment\n1="Cat",\n2="Fox")', {'Animal': {0: 'Dog', 1: 'Cat', 2: 'Fox'}}, 'Multiline enum'), ('enum Animal(0="Dog",1="Cat",2="Fox")', {'Animal': {0: 'Dog', 1: 'Cat', 2: 'Fox'}}, 'No Space  in Separator')))
def test_enums_read(enum_str, enum_dict, enum_label):
    f = io.BytesIO('FormatVersion=5.0 // Do not edit this line!\nTitle="An Example Title"\n\n{{ENUMS}}\n{}\n'.format(enum_str).encode('utf-8'))
    matrix = canmatrix.formats.sym.load(f)
    assert (matrix.load_errors == []), "Failed to load canmatrix, when testing enum case : '{}'".format(enum_label)
    assert (matrix.value_tables == enum_dict), "Enum not parsed correctly : '{}'".format(enum_label)
@pytest.mark.parametrize('enum_str, enum_dict, enum_label', (('enum Animal(0="Dog", 1="Cat", 2="Fox")', {'Animal': {0: 'Dog', 1: 'Cat', 2: 'Fox'}}, 'Simple enum'), ('enum Animal(0="Dog", //A Comment\n1="Cat",\n2="Fox")', {'Animal': {0: 'Dog', 1: 'Cat', 2: 'Fox'}}, 'Multiline enum'), ('enum Animal(0="Dog",1="Cat",2="Fox")', {'Animal': {0: 'Dog', 1: 'Cat', 2: 'Fox'}}, 'No Space  in Separator')))
def test_enums_read(enum_str, enum_dict, enum_label):
    f = io.BytesIO('FormatVersion=5.0 // Do not edit this line!\nTitle="An Example Title"\n\n{{ENUMS}}\n{}\n'.format(enum_str).encode('utf-8'))
    matrix = canmatrix.formats.sym.load(f)
    assert (matrix.load_errors == []), "Failed to load canmatrix, when testing enum case : '{}'".format(enum_label)
    assert (matrix.value_tables == enum_dict), "Enum not parsed correctly : '{}'".format(enum_label)