def _find_duplicated_modules(suite, directory): for module in getSuiteModules(suite): path = findFile('%s.py' % module, directory) if path: raise ImportError("Duplicated %s module found in %s" % (module, path))