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

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

Issue 9865009: Run json_schema_compiler unit tests via a PRESUBMIT check. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: switched to using whitelist as suggested Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « tools/json_schema_compiler/cpp_util_test.py ('k') | no next file » | 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 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # 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
3 # found in the LICENSE file. 4 # found in the LICENSE file.
4 5
5 from json_schema import CachedLoad 6 from json_schema import CachedLoad
6 import model 7 import model
7 import unittest 8 import unittest
8 9
9 class ModelTest(unittest.TestCase): 10 class ModelTest(unittest.TestCase):
10 def setUp(self): 11 def setUp(self):
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 param.choices[model.PropertyType.INTEGER].GetUnixName) 97 param.choices[model.PropertyType.INTEGER].GetUnixName)
97 param.choices[model.PropertyType.INTEGER].unix_name = 'asdf' 98 param.choices[model.PropertyType.INTEGER].unix_name = 'asdf'
98 param.choices[model.PropertyType.INTEGER].unix_name = 'tab_ids_integer' 99 param.choices[model.PropertyType.INTEGER].unix_name = 'tab_ids_integer'
99 self.assertEquals('tab_ids_integer', 100 self.assertEquals('tab_ids_integer',
100 param.choices[model.PropertyType.INTEGER].unix_name) 101 param.choices[model.PropertyType.INTEGER].unix_name)
101 self.assertRaises(AttributeError, 102 self.assertRaises(AttributeError,
102 param.choices[model.PropertyType.INTEGER].SetUnixName, 'breakage') 103 param.choices[model.PropertyType.INTEGER].SetUnixName, 'breakage')
103 104
104 if __name__ == '__main__': 105 if __name__ == '__main__':
105 unittest.main() 106 unittest.main()
OLDNEW
« no previous file with comments | « tools/json_schema_compiler/cpp_util_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698