@task
def _pretest_check():
    had_fail = False

    for mod, pkg in (('mock', 'Mock'), ('webtest', 'WebTest')):
        try:
            import mock
        except ImportError:
            info(_TESTS_INSTALL_PKG % dict(mod=mod, pkg=pkg))
            had_fail = True

    if had_fail:
        raise ImportError
dataset/ETHPy150Open binaryage/firelogger.py/pavement.py/_pretest_check/original