mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
io.text_encoding return utf-8 for RustPython for now
This commit is contained in:
1 parent
49ff3cb8b7
commit
0181e2b380
2 files changed
+2
-5
No files matched your search
Vendored
-4
@@ -1535,8 +1535,6 @@ class _BasePathTest(object):
|
||||
self.assertIs(False, P(BASE + '\udfff').exists())
|
||||
self.assertIs(False, P(BASE + '\x00').exists())
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_open_common(self):
|
||||
p = self.cls(BASE)
|
||||
with (p / 'fileA').open('r') as f:
|
||||
@@ -1566,8 +1564,6 @@ class _BasePathTest(object):
|
||||
self.assertRaises(TypeError, (p / 'fileA').write_text, b'somebytes')
|
||||
self.assertEqual((p / 'fileA').read_text(encoding='latin-1'), 'äbcdefg')
|
||||
|
||||
# TODO: RUSTPYTHON
|
||||
@unittest.expectedFailure
|
||||
def test_write_text_with_newlines(self):
|
||||
p = self.cls(BASE)
|
||||
# Check that `\n` character change nothing
|
||||
|
||||
+2
-1
@@ -3676,7 +3676,8 @@ mod _io {
|
||||
vm: &VirtualMachine,
|
||||
) -> PyResult<PyStrRef> {
|
||||
if vm.is_none(&encoding) {
|
||||
return Ok(vm.ctx.new_str("locale"));
|
||||
// TODO: This is `locale` encoding - but we don't have locale encoding yet
|
||||
return Ok(vm.ctx.new_str("utf-8"));
|
||||
}
|
||||
encoding.try_into_value(vm)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user