def test_word_combinations_3(): combos = Pattern.word_combinations(have=4, placeholders=3) assert list(combos) == [ (2, 1, 1), (1, 2, 1), (1, 1, 2) ]
def test_word_combinations_2(): combos = Pattern.word_combinations(have=4, placeholders=2) assert list(combos) == [ (3, 1), (2, 2), (1, 3) ]
def test_word_combinations_4(): combos = Pattern.word_combinations(have=5, placeholders=3) assert list(combos) == [ (3, 1, 1), (2, 2, 1), (2, 1, 2), (1, 3, 1), (1, 2, 2), (1, 1, 3), ]