mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
gh-125942: Android: set stdout to errors="backslashreplace" (#125943)
Android stdout/err streams now use `backslashreplace` encoding to ensure readability of the Android log.
This commit is contained in:
parent
e68d4b08ff
commit
b08570c90e
3 changed files with 10 additions and 8 deletions
|
|
@ -123,13 +123,10 @@ class TestAndroidOutput(unittest.TestCase):
|
|||
self.assertIs(stream.readable(), False)
|
||||
self.assertEqual(stream.fileno(), fileno)
|
||||
self.assertEqual("UTF-8", stream.encoding)
|
||||
self.assertEqual("backslashreplace", stream.errors)
|
||||
self.assertIs(stream.line_buffering, True)
|
||||
self.assertIs(stream.write_through, False)
|
||||
|
||||
# stderr is backslashreplace by default; stdout is configured
|
||||
# that way by libregrtest.main.
|
||||
self.assertEqual("backslashreplace", stream.errors)
|
||||
|
||||
def write(s, lines=None, *, write_len=None):
|
||||
if write_len is None:
|
||||
write_len = len(s)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue