diff options
Diffstat (limited to 'odoo/modules/module.py')
| -rw-r--r-- | odoo/modules/module.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/odoo/modules/module.py b/odoo/modules/module.py index 8d0dd5a7091..851395ba280 100644 --- a/odoo/modules/module.py +++ b/odoo/modules/module.py @@ -492,7 +492,8 @@ def run_unit_tests(module_name, position='at_install'): :rtype: bool """ global current_test - from odoo.tests.common import TagsSelector # Avoid import loop + # avoid dependency hell + from odoo.tests.common import TagsSelector, OdooSuite current_test = module_name mods = get_test_modules(module_name) threading.currentThread().testing = True @@ -501,7 +502,7 @@ def run_unit_tests(module_name, position='at_install'): r = True for m in mods: tests = unwrap_suite(unittest.TestLoader().loadTestsFromModule(m)) - suite = unittest.TestSuite(t for t in tests if position_tag.check(t) and config_tags.check(t)) + suite = OdooSuite(t for t in tests if position_tag.check(t) and config_tags.check(t)) if suite.countTestCases(): t0 = time.time() |
