Your tests are already nice, but they don't cover everything.
A function that strips all non-letters, lowercases the resultlowercases the result and then only compares the initial with the final character would survive the tests, but shouldn't.
To prove the above, add the following code at the top of the test_palindromes.py
file:
import re
def is_palindrome(word):
tidied = re.sub('[^A-Za-z]', '', word)
return tidied == '' or tidied[0] == tidied[-1]
Returning true
if only any
character matches instead of all
is a common mistake, therefore the tests should prevent this mistake from being made.