diff options
Diffstat (limited to 'Lib/test/test_asyncio')
-rw-r--r-- | Lib/test/test_asyncio/test_base_events.py | 2 | ||||
-rw-r--r-- | Lib/test/test_asyncio/test_events.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_asyncio/test_base_events.py b/Lib/test/test_asyncio/test_base_events.py index e40e7999b64..5691d4250ac 100644 --- a/Lib/test/test_asyncio/test_base_events.py +++ b/Lib/test/test_asyncio/test_base_events.py @@ -2096,7 +2096,7 @@ class BaseLoopSockSendfileTests(test_utils.TestCase): def test_nonbinary_file(self): sock = self.make_socket() - with open(os_helper.TESTFN, 'r') as f: + with open(os_helper.TESTFN, encoding="utf-8") as f: with self.assertRaisesRegex(ValueError, "binary mode"): self.run_loop(self.loop.sock_sendfile(sock, f)) diff --git a/Lib/test/test_asyncio/test_events.py b/Lib/test/test_asyncio/test_events.py index 6523a79b4a6..5511407ba53 100644 --- a/Lib/test/test_asyncio/test_events.py +++ b/Lib/test/test_asyncio/test_events.py @@ -1349,7 +1349,7 @@ class EventLoopTestsMixin: rpipe, wpipe = os.pipe() rpipeobj = io.open(rpipe, 'rb', 1024) - wpipeobj = io.open(wpipe, 'w', 1024) + wpipeobj = io.open(wpipe, 'w', 1024, encoding="utf-8") async def connect(): read_transport, _ = await loop.connect_read_pipe( |