OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The Chromium Authors. All rights reserved. | 2 # Copyright 2015 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 find_depot_tools | |
Dirk Pranke
2015/10/23 22:07:53
this won't actually work, right? build isn't in th
Roland McGrath
2015/10/23 22:55:45
Right. This was a mistake left from a previous (m
| |
6 from os import path as os_path | 7 from os import path as os_path |
7 import re | 8 import re |
8 import resource_checker | 9 import resource_checker |
9 from sys import path as sys_path | 10 from sys import path as sys_path |
10 import test_util | 11 import test_util |
11 import unittest | 12 import unittest |
12 | 13 |
13 _HERE = os_path.dirname(os_path.abspath(__file__)) | 14 _HERE = os_path.dirname(os_path.abspath(__file__)) |
14 sys_path.append(os_path.join(_HERE, '..', '..', '..', 'tools')) | 15 sys_path.append(os_path.join(_HERE, '..', '..', '..', 'build')) |
15 | 16 |
16 import find_depot_tools # pylint: disable=W0611 | |
17 from testing_support.super_mox import SuperMoxTestBase | 17 from testing_support.super_mox import SuperMoxTestBase |
18 | 18 |
19 | 19 |
20 class ResourceCheckerTest(SuperMoxTestBase): | 20 class ResourceCheckerTest(SuperMoxTestBase): |
21 def setUp(self): | 21 def setUp(self): |
22 SuperMoxTestBase.setUp(self) | 22 SuperMoxTestBase.setUp(self) |
23 | 23 |
24 input_api = self.mox.CreateMockAnything() | 24 input_api = self.mox.CreateMockAnything() |
25 input_api.re = re | 25 input_api.re = re |
26 output_api = self.mox.CreateMockAnything() | 26 output_api = self.mox.CreateMockAnything() |
(...skipping 30 matching lines...) Expand all Loading... | |
57 "<i>include src='blah'</i>", | 57 "<i>include src='blah'</i>", |
58 "</i>nclude", | 58 "</i>nclude", |
59 "</i>include", | 59 "</i>include", |
60 ] | 60 ] |
61 for line in lines: | 61 for line in lines: |
62 self.ShouldPassIncludeCheck(line) | 62 self.ShouldPassIncludeCheck(line) |
63 | 63 |
64 | 64 |
65 if __name__ == '__main__': | 65 if __name__ == '__main__': |
66 unittest.main() | 66 unittest.main() |
OLD | NEW |