mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix str.isalpha
This commit is contained in:
1 parent
dc6fa6cf62
commit
d7e32680a9
2 files changed
+1
-3
No files matched your search
@@ -665,8 +665,6 @@ class UnicodeTest(string_tests.CommonTest,
|
||||
'\U0001D7F6', '\U00011066', '\U000104A0', '\U0001F107']:
|
||||
self.assertTrue(ch.isalnum(), '{!a} is alnum.'.format(ch))
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_isalpha(self):
|
||||
super().test_isalpha()
|
||||
self.checkequalnofix(True, '\u1FFc', 'isalpha')
|
||||
|
||||
@@ -725,7 +725,7 @@ impl PyString {
|
||||
|
||||
#[pymethod]
|
||||
fn isalpha(&self) -> bool {
|
||||
!self.value.is_empty() && self.value.chars().all(char::is_alphanumeric)
|
||||
!self.value.is_empty() && self.value.chars().all(char::is_alphabetic)
|
||||
}
|
||||
|
||||
#[pymethod]
|
||||
|
||||
Reference in new issue
Block a user