8000 bpo-43651: PEP 597: Fix EncodingWarning in some tests by methane · Pull Request #25145 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-43651: PEP 597: Fix EncodingWarning in some tests #25145

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 18 commits into from
Apr 4, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Fix test_asyncio
  • Loading branch information
methane committed Apr 2, 2021
commit 6f7be26f539cbb86f35452652502d8eed14216da
2 changes: 1 addition & 1 deletion Lib/test/test_asyncio/test_base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -2096,7 +2096,7 @@ def test_blocking_socket(self):

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))

Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_asyncio/test_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1349,7 +1349,7 @@ def test_unclosed_pipe_transport(self):

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(
Expand Down
0