def test_unterminated_enum():
    f = io.BytesIO(textwrap.dedent('            FormatVersion=5.0 // Do not edit this line!\n            Title="Untitled\n            \n            {ENUMS}\n            enum Categories(0="Animal", 1="Vegetable", 3="Mineral"\n            \n            {SENDRECEIVE}\n            \n            [Symbol1]\n            ID=000h\n            DLC=8\n            Var=Signal unsigned 0,16\n            \n            ').encode('utf-8'))
    matrix = canmatrix.formats.sym.load(f)
    assert (len(matrix.load_errors) == 1)
    if (sys.version_info > (3, 0)):
        assert isinstance(matrix.load_errors[0], EOFError)
    else:
        assert isinstance(matrix.load_errors[0], StopIteration)
def test_unterminated_enum():
    f = io.BytesIO(textwrap.dedent('            FormatVersion=5.0 // Do not edit this line!\n            Title="Untitled\n            \n            {ENUMS}\n            enum Categories(0="Animal", 1="Vegetable", 3="Mineral"\n            \n            {SENDRECEIVE}\n            \n            [Symbol1]\n            ID=000h\n            DLC=8\n            Var=Signal unsigned 0,16\n            \n            ').encode('utf-8'))
    matrix = canmatrix.formats.sym.load(f)
    assert (len(matrix.load_errors) == 1)
    if (sys.version_info > (3, 0)):
        assert isinstance(matrix.load_errors[0], EOFError)
    else:
        assert isinstance(matrix.load_errors[0], StopIteration)