Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(1)  |  Derive(0)  |  Import(0)
tests all imported modules

takes an optional list of module names and/or module objects to skip over.
modules from files under under any of excluded_paths are also skipped.

        def try_all(excludes = [], excluded_paths=[]):
    """
    tests all imported modules

    takes an optional list of module names and/or module objects to skip over.
    modules from files under under any of excluded_paths are also skipped.
    """
    failed = []
    for modulename, module in modules.items():
        # skip builtins
        if not hasattr(module, '__file__'):
            continue
        # skip modules under any of excluded_paths
        if [p for p in excluded_paths if module.__file__.startswith(p)]:
            continue
        if modulename not in excludes and module not in excludes:
            try_module(module, modulename, failed)
    print_failed(failed)
        


src/b/e/benflix-HEAD/videoportal/BitTorrent/bttest.py   benflix(Download)
def run():
    testtest.try_all(['urllib', 'urllib2', 'StringIO', 'random', 'urlparse', 
        'BaseHTTPServer', 'httplib', 'BitTorrent.RawServer', 'BitTorrent.zurllib', 
        'base64', 'ftplib', 'gopherlib'])