Skip to content

Commit bc21d76

Browse files
authored
Fix a misuse of async with
1 parent ee7e966 commit bc21d76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_asyncio/test_streams.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ def test_LimitOverrunError_pickleable(self):
943943

944944
class NewStreamTests2(unittest.IsolatedAsyncioTestCase):
945945
async def test_wait_closed_on_close(self):
946-
async with test_utils.run_test_server() as httpd:
946+
with test_utils.run_test_server() as httpd:
947947
rd, wr = self.loop.run_until_complete(
948948
asyncio.open_connection(*httpd.address))
949949

@@ -1002,7 +1002,7 @@ async def inner(httpd):
10021002

10031003
async def test_eof_feed_when_closing_writer(self):
10041004
# See http://bugs.python.org/issue35065
1005-
async with test_utils.run_test_server() as httpd:
1005+
with test_utils.run_test_server() as httpd:
10061006
rd, wr = await asyncio.open_connection(*httpd.address)
10071007
wr.close()
10081008
f = wr.wait_closed()

0 commit comments

Comments
 (0)