Skip to content

Commit

Permalink
Merge pull request #36 from uc-cdis/chore/py3
Browse files Browse the repository at this point in the history
Chore(py3): Make syntax compatible with py3
  • Loading branch information
Jiaqi Liu authored Nov 8, 2019
2 parents 37057c5 + 1dc919c commit ed3e0b1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gdcdictionary/schema_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"""

from __future__ import print_function

from jsonschema import validate, ValidationError
import copy
Expand Down Expand Up @@ -78,7 +79,7 @@ def validate_entity(entity, schemata, project=None, name=''):

def validate_schemata(schemata, metaschema):
# validate schemata
print('Validating schemas against metaschema... '),
print('Validating schemas against metaschema... ', end=" ")
for s in schemata.values():
validate(s, metaschema)

Expand Down Expand Up @@ -172,7 +173,7 @@ def add_system_props(self, doc):
doc = json.load(f)
if args.invalid:
try:
print("CHECK if {0} is invalid:".format(f.name)),
print("CHECK if {0} is invalid:".format(f.name), end=" ")
print(type(doc))
if type(doc) == dict:
validate_entity(doc, dictionary.schema)
Expand All @@ -187,7 +188,7 @@ def add_system_props(self, doc):
else:
raise Exception("Expected invalid, but validated.")
else:
print ("CHECK if {0} is valid:".format(f.name)),
print("CHECK if {0} is valid:".format(f.name), end=" ")
if type(doc) == dict:
validate_entity(doc, dictionary.schema)
elif type(doc) == list:
Expand Down

0 comments on commit ed3e0b1

Please sign in to comment.