Пример #1
0
def validate(schema, data):
    try:
        print("\n\n")
        print(schema)
        print(data)
        validate_against_schema(schema, data)
        print("pass")
    except (ValueError, TypeError) as e:
        print(e)
Пример #2
0
def validate(schema, data):
    """Perform schema validation check."""
    try:
        print("\n\n")
        print(schema)
        print(data)
        validate_against_schema(schema, data)
        print("pass")
    except (ValueError, TypeError) as e:
        print(e)
Пример #3
0
def validate(schema, data):
    try:
        print("\n\n")
        print(schema)
        print(data)
        validate_against_schema(schema, data)
        print("pass")
    except ValueError as e:
        print(e)
        traceback.print_exc(file=sys.stdout)
Пример #4
0
def validate(schema, data):
    try:
        print("\n\n")
        print(schema)
        print(data)
        print(validate_against_schema(schema, data))
        print("pass")
    except (ValueError, TypeError, AssertionError) as e:
        print(e)
        traceback.print_exc(file=sys.stdout)
Пример #5
0
def validate(schema, data):
    """Perform schema validation check."""
    try:
        print("\n\n")
        print(schema)
        print(data)
        print(validate_against_schema(schema, data))
        print("pass")
    except ValueError as e:
        print(e)
        traceback.print_exc(file=sys.stdout)