[IMP] replace explicit iteration by listcomp

bzr revid: xmo@openerp.com-20140214143932-8nb30mkdxzt96fd5
This commit is contained in:
Xavier Morel
2014-02-14 15:39:32 +01:00
parent 2921fa339d
commit 4d32dabdd6
+2 -4
View File
@@ -331,10 +331,8 @@ def get_test_modules(module):
return []
# include submodules too
result = []
for name in sys.modules:
if name.startswith(module) and sys.modules[name]:
result.append(sys.modules[name])
result = [mod_obj for name, mod_obj in sys.modules.iteritems()
if name.startswith(module)]
return result
# Use a custom stream object to log the test executions.