aboutsummaryrefslogtreecommitdiffstats
path: root/test.py
diff options
context:
space:
mode:
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/test.py b/test.py
index bb9e345d4..0db989cb1 100755
--- a/test.py
+++ b/test.py
@@ -65,9 +65,15 @@ def findTests(testDir="."):
def validateSchema(jsonFile, schemaFile):
_report("validating", jsonFile, "with", schemaFile)
+
testSchema = readJSONFile(schemaFile)
- jsonInput = readJSONFile(jsonFile)
- jsonschema.validate(jsonInput, testSchema)
+ defSchema = readJSONFile("JSONSchema/definitions.json")
+ schema = { "definitions" : dict(defSchema["definitions"], **testSchema["definitions"])
+ , "patternProperties" : testSchema["patternProperties"]
+ }
+
+ jsonInput = readJSONFile(jsonFile)
+ jsonschema.validate(jsonInput, schema)
def validateTestFile(jsonFile):
if jsonFile.startswith("src/GeneralStateTestsFiller/"):