예제 #1
0
def test_summary_one_failed_one_missing():
    answers = [
        testResultFailed,
        testResultMissing,
    ]
    assert summarize_answers(
        answers) == '1 of 2 required tests failed, 1 result missing'
예제 #2
0
def test_summary_one_passed_one_invalid_gating_yaml_one_missing():
    answers = [
        testResultPassed,
        testResultMissing,
        testInvalidGatingYaml,
    ]
    assert summarize_answers(
        answers) == '1 of 3 required tests failed, 1 result missing'
예제 #3
0
def test_summary_one_passed_one_failed_one_missing_two_errored():
    answers = [
        testResultErrored,
        testResultPassed,
        testResultFailed,
        testResultMissing,
        testResultErrored,
    ]
    assert summarize_answers(
        answers) == '3 of 5 required tests failed, 1 result missing (2 errors)'
예제 #4
0
 def summary(self):
     return summarize_answers(self.answers)
예제 #5
0
def test_summary_one_passed_one_missing_waived():
    answers = [
        testResultPassed,
        TestResultWaived(testResultMissing),
    ]
    assert summarize_answers(answers) == 'All required tests passed'
예제 #6
0
def test_summary_one_passed_one_missing():
    answers = [
        testResultPassed,
        testResultMissing,
    ]
    assert summarize_answers(answers) == '1 of 2 required test results missing'
예제 #7
0
def test_summary_one_passed_one_failed():
    answers = [
        testResultPassed,
        testResultFailed,
    ]
    assert summarize_answers(answers) == '1 of 2 required tests failed'
예제 #8
0
def test_summary_errored():
    answers = [
        testResultErrored,
    ]
    assert summarize_answers(
        answers) == '1 of 1 required tests failed (1 error)'
예제 #9
0
def test_summary_missing():
    answers = [
        testResultMissing,
    ]
    assert summarize_answers(answers) == '1 of 1 required test results missing'
예제 #10
0
def test_summary_failed():
    answers = [
        testResultFailed,
    ]
    assert summarize_answers(answers) == '1 of 1 required tests failed'
예제 #11
0
def test_summary_empty():
    answers = []
    assert summarize_answers(answers) == 'no tests are required'
예제 #12
0
def test_summary_passed():
    answers = [
        testResultPassed,
    ]
    assert summarize_answers(answers) == 'All required tests passed'
예제 #13
0
def test_summary_invalid_gating_yaml():
    answers = [
        testInvalidGatingYaml,
    ]
    assert summarize_answers(answers) == '1 of 1 required tests failed'