Skip to content
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

gh-93357: Port test cases to IsolatedAsyncioTestCase, part 2 #97896

Merged
Merged
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
Prev Previous commit
Next Next commit
Fix a misuse of async with
  • Loading branch information
arhadthedev committed Oct 5, 2022
commit bc21d76edce3de151c68c166035d277c56215560
4 changes: 2 additions & 2 deletions Lib/test/test_asyncio/test_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -943,7 +943,7 @@ def test_LimitOverrunError_pickleable(self):

class NewStreamTests2(unittest.IsolatedAsyncioTestCase):
async def test_wait_closed_on_close(self):
async with test_utils.run_test_server() as httpd:
with test_utils.run_test_server() as httpd:
rd, wr = self.loop.run_until_complete(
asyncio.open_connection(*httpd.address))

Expand Down Expand Up @@ -1002,7 +1002,7 @@ async def inner(httpd):

async def test_eof_feed_when_closing_writer(self):
# See http://bugs.python.org/issue35065
async with test_utils.run_test_server() as httpd:
with test_utils.run_test_server() as httpd:
rd, wr = await asyncio.open_connection(*httpd.address)
wr.close()
f = wr.wait_closed()
Expand Down