mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix str.isascii
This commit is contained in:
1 parent
3498a52e18
commit
dc6fa6cf62
2 files changed
+1
-3
No files matched your search
@@ -679,8 +679,6 @@ class UnicodeTest(string_tests.CommonTest,
|
||||
self.assertFalse('\U0001F40D'.isalpha())
|
||||
self.assertFalse('\U0001F46F'.isalpha())
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_isascii(self):
|
||||
super().test_isascii()
|
||||
self.assertFalse("\u20ac".isascii())
|
||||
|
||||
@@ -795,7 +795,7 @@ impl PyString {
|
||||
|
||||
#[pymethod]
|
||||
fn isascii(&self) -> bool {
|
||||
!self.value.is_empty() && self.value.chars().all(|c| c.is_ascii())
|
||||
self.value.chars().all(|c| c.is_ascii())
|
||||
}
|
||||
|
||||
#[pymethod]
|
||||
|
||||
Reference in new issue
Block a user