def get_test_modules(module):
 modpath = ('odoo.addons.' + module)
 try:
  mod = importlib.import_module('.tests', modpath)
 except Exception as e:
  if (str(e) != 'No module named tests'):
   _logger.exception('Can not `import %s`.', module)
  return []
 if (hasattr(mod, 'fast_suite') or hasattr(mod, 'checks')):
  _logger.warn('Found deprecated fast_suite or checks attribute in test module %s. These have no effect in or after version 8.0.', mod.__name__)
 result = [mod_obj for (name, mod_obj) in inspect.getmembers(mod, inspect.ismodule) if name.startswith('test_')]
 return result

def get_test_modules ( module ) : modpath = ( 'odoo.addons.' + module ) try : mod = importlib . import_module ( '.tests' , modpath ) except Exception as e : if ( str ( e ) != 'No module named tests' ) : _logger . exception ( 'Can not `import %s`.' , module ) return [ ] if ( hasattr ( mod , 'fast_suite' ) or hasattr ( mod , 'checks' ) ) : _logger . warn ( 'Found deprecated fast_suite or checks attribute in test module %s. These have no effect in or after version 8.0.' , mod . __name__ ) result = [ mod_obj for ( name , mod_obj ) in inspect . getmembers ( mod , inspect . ismodule ) if name . startswith ( 'test_' ) ] return result
return a list of module for the addons potentially containing tests to feed unittest .