Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: tools/json_schema_compiler/json_schema_test.py

Issue 23549025: Clean up JSON Schema Compiler. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Removed enum test and added blank lines. Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/json_schema_compiler/json_schema.py ('k') | tools/json_schema_compiler/model_test.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import json_schema 6 import json_schema
7 import json_schema_test
8 import unittest 7 import unittest
9 8
10 class JsonSchemaUnittest(unittest.TestCase): 9 class JsonSchemaUnittest(unittest.TestCase):
11 def testNocompile(self): 10 def testNocompile(self):
12 compiled = [ 11 compiled = [
13 { 12 {
14 "namespace": "compile", 13 "namespace": "compile",
15 "description": "The compile API.", 14 "description": "The compile API.",
16 "functions": [], 15 "functions": [],
17 "types": {} 16 "types": {}
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 } 71 }
73 } 72 }
74 } 73 }
75 } 74 }
76 } 75 }
77 ] 76 ]
78 77
79 schema = json_schema.CachedLoad('test/json_schema_test.json') 78 schema = json_schema.CachedLoad('test/json_schema_test.json')
80 self.assertEquals(compiled, json_schema.DeleteNodes(schema, 'nocompile')) 79 self.assertEquals(compiled, json_schema.DeleteNodes(schema, 'nocompile'))
81 80
81
82 if __name__ == '__main__': 82 if __name__ == '__main__':
83 unittest.main() 83 unittest.main()
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/json_schema.py ('k') | tools/json_schema_compiler/model_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698