def test_human():
    """
    Final human sanity check.
    """
    human_approves = confirm("Does that look OK for you?")
    if not human_approves:
        f.error("Cancelled by user.")
def test_external():
    """
    Runs tests against known sites. Only exits on catastrophic failure.
    """
    external_passed = _scan_external()
    if not external_passed:
        f.error("External scans failed... abort.")
def test_internal():
    """
    Runs unit tests.
    """
    tests_passed = subprocess.call(['./droopescan', 'test']) == 0
    if not tests_passed:
        f.error("Unit tests failed... abort.")
def changelog_modify():
    prev_version_nb = read_first_line(CHANGELOG)
    version_nb = get_input("Version number (prev %s):" %
            prev_version_nb)

    final = changelog(version_nb).strip() + "\n\n"

    print("The following will be prepended to the CHANGELOG:\n---\n%s---" % final)

    ok = confirm("Is that OK?")
    if ok:
        prepend_to_file(CHANGELOG, final)
        return version_nb
    else:
        f.error("Cancelled by user.")
def check_pypirc():
    pypirc = os.path.expanduser("~/.pypirc")
    if not os.path.isfile(pypirc):
        f.error('File "%s" does not exist.' % pypirc)
 def error(self, *args, **kwargs):
     f.error(*args, **kwargs)
Beispiel #7
0
 def error(self, *args, **kwargs):
     f.error(*args, **kwargs)