OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 """ | 3 """ |
4 Copyright 2014 Google Inc. | 4 Copyright 2014 Google Inc. |
5 | 5 |
6 Use of this source code is governed by a BSD-style license that can be | 6 Use of this source code is governed by a BSD-style license that can be |
7 found in the LICENSE file. | 7 found in the LICENSE file. |
8 | 8 |
9 Test git_utils.py. | 9 Test git_utils.py. |
10 """ | 10 """ |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 'file %s should exist' % filepath) | 92 'file %s should exist' % filepath) |
93 | 93 |
94 | 94 |
95 def main(test_case_class): | 95 def main(test_case_class): |
96 """Run the unit tests within this class.""" | 96 """Run the unit tests within this class.""" |
97 suite = unittest.TestLoader().loadTestsFromTestCase(NewGitCheckoutTest) | 97 suite = unittest.TestLoader().loadTestsFromTestCase(NewGitCheckoutTest) |
98 results = unittest.TextTestRunner(verbosity=2).run(suite) | 98 results = unittest.TextTestRunner(verbosity=2).run(suite) |
99 if not results.wasSuccessful(): | 99 if not results.wasSuccessful(): |
100 raise Exception('failed unittest %s' % test_case_class) | 100 raise Exception('failed unittest %s' % test_case_class) |
101 | 101 |
| 102 |
102 if __name__ == '__main__': | 103 if __name__ == '__main__': |
103 main(NewGitCheckoutTest) | 104 main(NewGitCheckoutTest) |
OLD | NEW |