Skip to content

Commit

Permalink
bpo-32636: Fix two bugs in test_asyncio (#5302)
Browse files Browse the repository at this point in the history
  • Loading branch information
vstinner authored and 1st1 committed Jan 24, 2018
1 parent fb5a7ad commit 789e359
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions Lib/test/test_asyncio/test_base_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -1917,6 +1917,7 @@ def test_nonbinary_file(self):

def test_nonstream_socket(self):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.setblocking(False)
self.addCleanup(sock.close)
with self.assertRaisesRegex(ValueError, "only SOCK_STREAM type"):
self.run_loop(self.loop.sock_sendfile(sock, self.file))
Expand Down
2 changes: 1 addition & 1 deletion Lib/test/test_asyncio/test_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2448,7 +2448,7 @@ async def coro():
self.loop = asyncio.new_event_loop()
try:
fut = Fut(loop=self.loop)
self.loop.call_later(0.1, fut.set_result(1))
self.loop.call_later(0.1, fut.set_result, 1)
task = asyncio.Task(coro(), loop=self.loop)
res = self.loop.run_until_complete(task)
finally:
Expand Down

0 comments on commit 789e359

Please sign in to comment.