Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1from e12_most_repeating_letters import most_repeating_letter_count, most_repeating_word, WORDS 

2import pytest 

3 

4 

5@pytest.mark.parametrize('one_word, count', [ 

6 ('banana', 3), 

7 ('apple', 2), 

8 ('balloon', 2), 

9 ('abcabcabca', 4) 

10]) 

11def test_most_repeating_letter_count(one_word, count): 

12 assert most_repeating_letter_count(one_word) == count 

13 

14 

15@pytest.mark.parametrize('list_of_words, one_word', [ 

16 (WORDS, 'elementary'), 

17 ('hello out there'.split(), 'hello'), 

18 ('there out hello'.split(), 'there') 

19]) 

20def test_most_repeating_word(list_of_words, one_word): 

21 assert most_repeating_word(list_of_words) == one_word