mirror of
https://github.com/harivansh-afk/veet-code.git
synced 2026-04-15 17:01:03 +00:00
update testing frame and ui
This commit is contained in:
parent
fcb740f0c2
commit
205957c167
8 changed files with 173 additions and 101 deletions
|
|
@ -6,39 +6,31 @@ from solution import is_palindrome
|
|||
class TestBasicCases:
|
||||
"""Test basic functionality with typical inputs."""
|
||||
|
||||
def test_example_one(self):
|
||||
"""Test first example from problem description."""
|
||||
assert is_palindrome("A man, a plan, a canal: Panama") == True
|
||||
|
||||
def test_example_two(self):
|
||||
"""Test second example from problem description."""
|
||||
assert is_palindrome("race a car") == False
|
||||
|
||||
def test_simple_palindrome(self):
|
||||
"""Test basic palindrome word."""
|
||||
assert is_palindrome("racecar") == True
|
||||
|
||||
def test_sentence_palindrome(self):
|
||||
"""Test palindrome with spaces and punctuation."""
|
||||
assert is_palindrome("A man, a plan, a canal: Panama") == True
|
||||
|
||||
def test_not_palindrome(self):
|
||||
"""Test non-palindrome string."""
|
||||
assert is_palindrome("hello") == False
|
||||
|
||||
|
||||
class TestEdgeCases:
|
||||
"""Test edge cases and boundary conditions."""
|
||||
|
||||
def test_empty_string(self):
|
||||
"""Test with empty input."""
|
||||
def test_empty_input(self):
|
||||
"""Test with empty or minimal input."""
|
||||
assert is_palindrome("") == True
|
||||
|
||||
def test_single_character(self):
|
||||
"""Test with single character."""
|
||||
def test_single_element(self):
|
||||
"""Test with single element input."""
|
||||
assert is_palindrome("a") == True
|
||||
|
||||
def test_only_spaces(self):
|
||||
"""Test with only whitespace."""
|
||||
assert is_palindrome(" ") == True
|
||||
|
||||
def test_mixed_case(self):
|
||||
"""Test case insensitivity."""
|
||||
assert is_palindrome("RaceCar") == True
|
||||
|
||||
def test_numbers_in_string(self):
|
||||
"""Test with numbers."""
|
||||
assert is_palindrome("12321") == True
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue