| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
| 4 | 4 |
| 5 import unittest | 5 import unittest |
| 6 | 6 |
| 7 from .type_definitions import Test, Result, MultiTest, FuncCall, Bind | 7 from .type_definitions import Test, Result, MultiTest, FuncCall, Bind |
| 8 | 8 |
| 9 | 9 |
| 10 def _SetUpClass(test_class): | 10 def _SetUpClass(test_class): |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 | 85 |
| 86 @type test_module: types.ModuleType | 86 @type test_module: types.ModuleType |
| 87 """ | 87 """ |
| 88 name_prefix = name_prefix + test_module.__name__ + '.' | 88 name_prefix = name_prefix + test_module.__name__ + '.' |
| 89 for name in dir(test_module): | 89 for name in dir(test_module): |
| 90 obj = getattr(test_module, name) | 90 obj = getattr(test_module, name) |
| 91 if isinstance(obj, type) and issubclass(obj, unittest.TestCase): | 91 if isinstance(obj, type) and issubclass(obj, unittest.TestCase): |
| 92 for test in UnittestTestCase(obj, name_prefix, ext): | 92 for test in UnittestTestCase(obj, name_prefix, ext): |
| 93 yield test | 93 yield test |
| 94 # TODO(iannucci): Make this compatible with the awful load_tests hack? | 94 # TODO(iannucci): Make this compatible with the awful load_tests hack? |
| OLD | NEW |