def test_find_missing_scores_arena(): match_ids = [ ('A', 0) ] last_match = 0 schedule = [ {'A': None, 'B': None} ] missing = find_missing_scores(match_ids, last_match, schedule) expected = [ (0, set(['B'])) ] assert missing == expected
def test_find_missing_scores_match(): match_ids = [ ('A', 1) ] last_match = 1 schedule = [ {'A': None}, {'A': None} ] missing = find_missing_scores(match_ids, last_match, schedule) expected = [ (0, set(['A'])) ] assert missing == expected
def test_find_missing_scores_ignore_future_matches(): match_ids = [ ('A', 0), ('A', 1), ('A', 2) ] last_match = 2 schedule = [ {'A': None}, {'A': None}, {'A': None}, {'A': None}, {'A': None} ] missing = find_missing_scores(match_ids, last_match, schedule) assert missing == []
def test_find_missing_scores_many_matches(): match_ids = [ ('A', 0), ('A', 2), ('A', 4) ] last_match = 4 schedule = [ {'A': None}, {'A': None}, {'A': None}, {'A': None}, {'A': None} ] missing = find_missing_scores(match_ids, last_match, schedule) expected = [ (1, set(['A'])), (3, set(['A'])) ] assert missing == expected