diff --git a/tests/test_schemas.py b/tests/test_schemas.py index 262989d5..2028f8d1 100644 --- a/tests/test_schemas.py +++ b/tests/test_schemas.py @@ -162,25 +162,28 @@ def test_property_count(self): assert stats def test_types(self): - ''' + """ Every property in a schema should have a type defined - ''' + """ errs = [] for schema_name in SCHEMA_FILES: with open(os.path.join(SCHEMAS_DIR, schema_name)) as json_schema: schema = json.load(json_schema) if schema_name != "common.json": - for prop, fields in schema['properties'].items(): + for prop, fields in schema["properties"].items(): if "type" not in fields and "$ref" not in fields: errs.append((schema_name, prop)) else: if "type" not in fields: errs.append((schema_name, prop)) - assert not errs, ( - "The following schemata do not have types defined:\n\t" - + "\n\t".join("- {} schema has property '{}' missing a 'type'".format(e[0], e[1]) for e in errs) - ) + assert ( + not errs + ), "The following schemata do not have types defined:\n\t" + "\n\t".join( + "- {} schema has property '{}' missing a 'type'".format(e[0], e[1]) + for e in errs + ) + class TestExamples: with open(os.path.join(SCHEMAS_DIR, "example.json")) as ff: