示例#1
0
def test_uppercase_palindrome():
    assert is_palindrome('OTTO') == True
示例#2
0
def test_sentence_with_punctuation_middle_palindrome():
    assert is_palindrome("madam i'm adam") == True
示例#3
0
def test_sentence_with_punctuation_end_palindrome():
    assert is_palindrome("madam i'm adam.") == True
示例#4
0
def test_sentence_nonpalindrome():
    assert is_palindrome('mdam im adam') == False
示例#5
0
def test_lowercase_palindrome():
    assert is_palindrome('atta') == True
示例#6
0
def test_spaced_nonpalindrome():
    assert is_palindrome('a D c b a') == False
示例#7
0
def test_sentence_palindrome():
    assert is_palindrome('madam im adam') == True
示例#8
0
def test_number_letter_mix_nonpalindrome():
    assert is_palindrome('wfsa23w321') == False
示例#9
0
def test_uneven_spaced_palindrome():
    assert is_palindrome('ab c b a') == True
示例#10
0
def test_number_string_nonpalindrome():
    assert is_palindrome('23321') == False
示例#11
0
def test_number_letter_mix_palindrome():
    assert is_palindrome('1f23g32f1') == True
示例#12
0
def test_number_string_palindrome():
    assert is_palindrome('123321') == True
示例#13
0
def test_nonpalindrome_mixed():
    assert is_palindrome('hRGiUhN') == False
示例#14
0
def test_nonpalindrome_upper():
    assert is_palindrome('HHRGKIUHN') == False
示例#15
0
def test_nonpalindrome_lower():
    assert is_palindrome('wghysg') == False
示例#16
0
def test_mixedcase_palindrome():
    assert is_palindrome('ObTTbO') == True