Beispiel #1
0
def test_letter_count_hypothesis(copies_as_int, chosen_letter):
    """Returns output with correct number of copies."""
    copy_count = copies_as_int
    copies_as_string = str(copies_as_int)
    copied_character_string = copies.mcopies_of(copies_as_string,
                                                chosen_letter)
    assert len(copied_character_string) == copy_count
    assert copied_character_string.count(chosen_letter) == copy_count
Beispiel #2
0
def test_letter_count_single():
    """Returns output with correct number of copies."""
    copied_character_string = copies.mcopies_of("10", CHOSEN_LETTER)
    assert len(copied_character_string) == 10
    assert copied_character_string.count(CHOSEN_LETTER) == 10
Beispiel #3
0
def test_letter_count_multiple(letter_count, expected_count, chosen_letter):
    """Returns output with correct number of copies."""
    copied_character_string = copies.mcopies_of(letter_count, chosen_letter)
    assert len(copied_character_string) == expected_count
    assert copied_character_string.count(chosen_letter) == expected_count