OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The LUCI Authors. All rights reserved. | 2 # Copyright 2016 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 import copy | |
7 import json | |
8 import os | |
9 import subprocess | |
10 import sys | 6 import sys |
11 import unittest | 7 import unittest |
12 | 8 |
13 from collections import OrderedDict | 9 from collections import OrderedDict |
14 | 10 |
15 import test_env | 11 import test_env |
16 | 12 |
17 import mock | |
18 | |
19 from recipe_engine import post_process | 13 from recipe_engine import post_process |
20 from recipe_engine import checker | 14 from recipe_engine import checker |
21 | 15 |
22 def mkS(name, *fields): | 16 def mkS(name, *fields): |
23 ret = { | 17 ret = { |
24 'name': name, | 18 'name': name, |
25 'sub_a': ['thing', 'other'], | 19 'sub_a': ['thing', 'other'], |
26 'sub_b': 100, | 20 'sub_b': 100, |
27 'sub_c': 'hi', | 21 'sub_c': 'hi', |
28 } | 22 } |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 | 131 |
138 def test_dnr_pass_re(self): | 132 def test_dnr_pass_re(self): |
139 self.expect_fails(0, post_process.DoesNotRunRE, 'x') | 133 self.expect_fails(0, post_process.DoesNotRunRE, 'x') |
140 | 134 |
141 def test_dnr_fail_re(self): | 135 def test_dnr_fail_re(self): |
142 self.expect_fails(3, post_process.DoesNotRunRE, 'b') | 136 self.expect_fails(3, post_process.DoesNotRunRE, 'b') |
143 | 137 |
144 | 138 |
145 if __name__ == '__main__': | 139 if __name__ == '__main__': |
146 sys.exit(unittest.main()) | 140 sys.exit(unittest.main()) |
OLD | NEW |