From e091b9be7a31d1985e685991c05ea3f9b548bddc Mon Sep 17 00:00:00 2001 From: Dimitry Date: Mon, 19 Nov 2018 21:28:33 +0300 Subject: fix blockchain tests expect section json scheme check more info when scheme check errors --- test.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test.py') diff --git a/test.py b/test.py index 0189859ad..e0a3bc24c 100755 --- a/test.py +++ b/test.py @@ -108,7 +108,12 @@ def validateSchema(testFile, schemaFile): try: jsonschema.validate(testInput, schema) except: + from jsonschema import Draft4Validator _logerror("Validation failed:", "schema", schemaFile, "on", testFile) + v = Draft4Validator(schema) + errors = sorted(v.iter_errors(testInput), key=lambda e: e.path) + for error in errors: + _logerror(error.message) def validateTestFile(testFile): if testFile.startswith("./src/VMTestsFiller/"): -- cgit v1.2.3