Exemple #1
0
def test_generate_exit_code_with_issues():
    one_failure_report = {'has a license': (True, "LICENSE exists and isn't empty."),
                          'has remotes': (False, 'There are no remotes.')}
    assert generate_exit_code(one_failure_report) == 3
    complete_failure_report = {'has a license': (False, "Where is your LICENSE?"),
                               'has remotes': (False, 'There are no remotes.')}
    assert generate_exit_code(complete_failure_report) == 3
Exemple #2
0
def test_generate_exit_code_with_no_issues():
    all_successes = {'has a license': (True, "LICENSE exists and isn't empty."),
                     'has remotes': (True, 'There are remotes.')}
    assert generate_exit_code(all_successes) == 0