Example #1
0
def test_canonical_error(data_filename, canonical_filename, verbose=False):
    data = open(data_filename, 'rb').read()
    try:
        output = list(yaml.canonical_load_all(data))
    except yaml.YAMLError, exc:
        if verbose:
            print exc
Example #2
0
def test_canonical_error(data_filename, canonical_filename, verbose=False):
    data = open(data_filename, 'rb').read()
    try:
        output = list(yaml.canonical_load_all(data))
    except yaml.YAMLError, exc:
        if verbose:
            print exc
Example #3
0
def test_canonical_error(data_filename, canonical_filename, verbose=False):
    data = open(data_filename, 'rb').read()
    try:
        output = list(yaml.canonical_load_all(data))
    except yaml.YAMLError as exc:
        if verbose:
            print(exc)
    else:
        raise AssertionError("expected an exception")
Example #4
0
def test_canonical_error(data_filename, canonical_filename, verbose=False):
    data = open(data_filename, 'rb').read()
    try:
        output = list(yaml.canonical_load_all(data))
    except yaml.YAMLError as exc:
        if verbose:
            print(exc)
    else:
        raise AssertionError("expected an exception")