Skip to main content

Practice ยท 1 of 2

Test the Palindrome

Write test_palindrome(fn) that receives a palindrome checker and RETURNS a list of failure-message strings (empty list = your tests all passed). Your tests must cover: 'radar' -> True, 'Racecar' -> True (case-insensitive), 'hello' -> False, '' -> True. The grader runs your tests against a correct AND a subtly broken implementation โ€” both must be caught appropriately.

Difficulty: beginner

Back to lesson: Practice: Write Your Own Tests