def test_longest_word(): """ Tests the function count_divisible_digits """ print('Testing longest_word') assert_equals('3: shells', hw1.longest_word('poem.txt')) assert_equals(None, hw1.longest_word('nothing.txt'))
def test_longest_word(): """ Test the function longest_word """ print('Testing longest_word') assert_equals('3: shells', hw1.longest_word('poem.txt')) assert_equals('19: confession', hw1.longest_word('poem2.txt')) assert_equals(None, hw1.longest_word('empty.txt'))
def test_longest_word(): """ Tests the function longest_word """ print('Testing longest_word') # Spec test assert_equals('3: shells', hw1.longest_word('poem.txt')) # Edge cases assert_equals(None, hw1.longest_word('empty.txt')) assert_equals(None, hw1.longest_word('spaces.txt'))
def test_longest_word(): """ Tests the longest_word """ print('Testing longest_word') # Notice that we have to start the function calls with "hw1." since # they live in another file # Cases from the made up "spec" for this problem assert_equals('3: shells', hw1.longest_word('poem.txt')) # Additional two cases assert_equals('6: seashells', hw1.longest_word('poem2.txt')) assert_equals('7: sea-whale-shells', hw1.longest_word('poem3.txt'))
def test_longest_word(): assert_equals('3: Merrily,', hw1.longest_word('song.txt')) # new tests assert_equals(None, hw1.longest_word('empty.txt')) assert_equals('1: asdf', hw1.longest_word('tie.txt'))