| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 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 """Implements a unittest TestRunner with GTest output. | 6 """Implements a unittest TestRunner with GTest output. |
| 7 | 7 |
| 8 This output is ported from gtest.cc's PrettyUnitTestResultPrinter, but | 8 This output is ported from gtest.cc's PrettyUnitTestResultPrinter, but |
| 9 designed to be a drop-in replacement for unittest's TextTestRunner. | 9 designed to be a drop-in replacement for unittest's TextTestRunner. |
| 10 """ | 10 """ |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 self.result = runner.result | 99 self.result = runner.result |
| 100 | 100 |
| 101 def run(self, test): | 101 def run(self, test): |
| 102 "Run the given test case or test suite." | 102 "Run the given test case or test suite." |
| 103 if not self.result: | 103 if not self.result: |
| 104 self.result = GTestTestResult() | 104 self.result = GTestTestResult() |
| 105 test(self.result) | 105 test(self.result) |
| 106 if self.print_result_after_run: | 106 if self.print_result_after_run: |
| 107 self.result.PrintSummary() | 107 self.result.PrintSummary() |
| 108 return self.result | 108 return self.result |
| OLD | NEW |