Exemplo n.º 1
0
def test_status_line():
    ### At this point we've tested status_tuple() and
    ### is_status_line(), so we can use them.
    results = zip([ck.status_tuple(line) for line in STATUS_CASES
                   if ck.is_status_line(line)],
                  [line for line in STATUS_CASES
                   if ck.is_status_line(line)])
    for tpl, line in results:
        test.eq_(ck.status_line(tpl), line)
Exemplo n.º 2
0
def test_is_status_line():
    results = [True, True, True, False, False, False]
    for line, expected in zip(STATUS_CASES, results):
        test.eq_(ck.is_status_line(line), expected)
    for line, exc in STATUS_EXCEPTIONS:
        test.assert_raises(exc, ck.is_status_line, line)
Exemplo n.º 3
0
def test_get_status_lines():
    ### At this point we've tested is_status_line() so we can use it.
    assert all([ck.is_status_line(line) for line in
                ck.get_status_lines(STATUS_CASES)])