OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2013 The Chromium Authors. All rights reserved. | 2 # Copyright 2013 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 """Unit tests for gatekeeper_ng.py. | 6 """Unit tests for gatekeeper_ng.py. |
7 | 7 |
8 This is a basic check that gatekeeper_ng.py can properly interpret builds and | 8 This is a basic check that gatekeeper_ng.py can properly interpret builds and |
9 close the tree. | 9 close the tree. |
10 | 10 |
(...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2725 {'squirrels': ['yay']}) | 2725 {'squirrels': ['yay']}) |
2726 with self.assertRaises(AssertionError): | 2726 with self.assertRaises(AssertionError): |
2727 self.call_gatekeeper() | 2727 self.call_gatekeeper() |
2728 | 2728 |
2729 # Check that the checked in gatekeeper.json is valid. | 2729 # Check that the checked in gatekeeper.json is valid. |
2730 def testCheckedInConfigIsValid(self): | 2730 def testCheckedInConfigIsValid(self): |
2731 sys.argv.extend(['--verify']) | 2731 sys.argv.extend(['--verify']) |
2732 self.call_gatekeeper( | 2732 self.call_gatekeeper( |
2733 json=os.path.join(SCRIPT_DIR, os.pardir, 'gatekeeper.json')) | 2733 json=os.path.join(SCRIPT_DIR, os.pardir, 'gatekeeper.json')) |
2734 | 2734 |
| 2735 def testCheckedInTreeConfigIsValid(self): # pylint: disable=R0201 |
| 2736 tree_config = os.path.join(SCRIPT_DIR, os.pardir, 'gatekeeper_trees.json') |
| 2737 gatekeeper_ng_config.load_gatekeeper_tree_config(tree_config) |
| 2738 |
2735 | 2739 |
2736 if __name__ == '__main__': | 2740 if __name__ == '__main__': |
2737 with utils.print_coverage(include=[__file__]): | 2741 with utils.print_coverage(include=[__file__]): |
2738 unittest.main() | 2742 unittest.main() |
OLD | NEW |