def get_module_methods(module_name):
    if module_name not in sys.modules:
        try:
            __import__(module_name)
        except ImportError:
            if not module_name.startswith("User."):
                print("Could not load: " + module_name)
            return {}

    module = sys.modules[module_name]
    methods = {}
    for k,v in module.__dict__.items():
        if isinstance(v, types.FunctionType):
            methods[k] = v

    return methods
Check that an error logged in one test doesn't fail the next test.
dataset/ETHPy150Open lionicsheriff/SublimeAcmePlumbing/AcmePlumbing.py/get_module_methods--crossover with--dataset/ETHPy150Open kuri65536/python-for-android/python-modules/twisted/twisted/trial/test/test_log.py/LogErrors.test_errorsIsolated