Пример #1
0
def test_team_of_three_order_does_not_matter(test_input, expected):
    combos = list(friends_teams(friends, team_size=3, order_does_matter=False))
    assert len(combos) == 4
    if expected:
        assert test_input in combos
    else:
        assert test_input not in combos
Пример #2
0
def test_team_of_two_order_does_not_matter(test_input, expected):
    """First test lists all combos"""
    combos = list(friends_teams(friends, team_size=2, order_does_matter=False))
    assert len(combos) == 6
    if expected:
        assert test_input in combos
    else:
        assert test_input not in combos
Пример #3
0
def test_friends_teams_two_order_does_not_matter(test_input, expected):

    combos = friends_teams(friends, team_size=2, order_does_matter=False)
    assert len(combos) == 6
    if expected:  # return True or False
        assert test_input in combos
    else:
        assert test_input not in combos
Пример #4
0
def test_team_of_three_order_does_matter(test_input, expected):
    combos = list(friends_teams(friends, team_size=3, order_does_matter=True))
    assert len(combos) == 24
    assert test_input in combos
Пример #5
0
def test_team_of_two_order_does_matter(test_input, expected):
    """From here on just test a subset of combos"""
    combos = list(friends_teams(friends, team_size=2, order_does_matter=True))
    assert len(combos) == 12
    assert test_input in combos
Пример #6
0
def test_friends_teams_two_order_does_matter(test_input, expected):

    combos = friends_teams(friends, team_size=2, order_does_matter=True)
    assert len(combos) == 12
    assert test_input in combos