Skip to content

Commit

Permalink
Merge pull request #5 from djiwandou/palindrome_test
Browse files Browse the repository at this point in the history
test: Add test palindrome parameterized
  • Loading branch information
djiwandou authored Dec 13, 2023
2 parents d4d9e52 + 9616fec commit bc19b6e
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/unit/test_palindrome_param.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from src.palindrome import is_palindrome
import pytest
@pytest.mark.parametrize("palindrome", [
"",
"a",
"katak",
"kodok",
])
def test_is_palindrome(palindrome):
assert is_palindrome(palindrome)

@pytest.mark.parametrize("non_palindrome", [
"abc",
"abab",
"Bob",
"Never odd or even",
"Do geese see God?",
])
def test_is_palindrome_not_palindrome(non_palindrome):
assert not is_palindrome(non_palindrome)

0 comments on commit bc19b6e

Please sign in to comment.