Pytest simple tests - failure
- Failure reported by user: is_anagram("anagram", "nag a ram") is expected to return true.
- We write a test case to reproduce the problem. It should fail now.
examples/pytest/test_mymod_2.py
from mymod_1 import is_anagram def test_anagram(): assert is_anagram("elvis", "lives") assert is_anagram("silent", "listen") assert not is_anagram("one", "two") def test_multiword_anagram(): assert is_anagram("ana gram", "naga ram") assert is_anagram("anagram", "nag a ram")