Skip to content

Commit 789e359

Browse files
vstinner1st1
authored andcommitted
bpo-32636: Fix two bugs in test_asyncio (#5302)
1 parent fb5a7ad commit 789e359

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Lib/test/test_asyncio/test_base_events.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,7 @@ def test_nonbinary_file(self):
19171917

19181918
def test_nonstream_socket(self):
19191919
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
1920+
sock.setblocking(False)
19201921
self.addCleanup(sock.close)
19211922
with self.assertRaisesRegex(ValueError, "only SOCK_STREAM type"):
19221923
self.run_loop(self.loop.sock_sendfile(sock, self.file))

Lib/test/test_asyncio/test_tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2448,7 +2448,7 @@ async def coro():
24482448
self.loop = asyncio.new_event_loop()
24492449
try:
24502450
fut = Fut(loop=self.loop)
2451-
self.loop.call_later(0.1, fut.set_result(1))
2451+
self.loop.call_later(0.1, fut.set_result, 1)
24522452
task = asyncio.Task(coro(), loop=self.loop)
24532453
res = self.loop.run_until_complete(task)
24542454
finally:

0 commit comments

Comments
 (0)