Skip to content

Commit f11f3c5

Browse files
committed
pythongh-129354: Clenaup test_coroutines
Remove unused variables.
1 parent a25042e commit f11f3c5

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_coroutines.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ async def func(): pass
735735

736736
def test_func_12(self):
737737
async def g():
738-
i = me.send(None)
738+
me.send(None)
739739
await foo
740740
me = g()
741741
with self.assertRaisesRegex(ValueError,
@@ -2283,7 +2283,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
22832283
buffer.append(exc_type.__name__)
22842284

22852285
async def f():
2286-
async with CM() as c:
2286+
async with CM():
22872287
await asyncio.sleep(0.01)
22882288
raise MyException
22892289
buffer.append('unreachable')
@@ -2375,7 +2375,7 @@ def check(depth, msg):
23752375

23762376
orig_depth = sys.get_coroutine_origin_tracking_depth()
23772377
try:
2378-
msg = check(0, f"coroutine '{corofn.__qualname__}' was never awaited")
2378+
check(0, f"coroutine '{corofn.__qualname__}' was never awaited")
23792379
check(1, "".join([
23802380
f"coroutine '{corofn.__qualname__}' was never awaited\n",
23812381
"Coroutine created at (most recent call last)\n",
@@ -2413,7 +2413,6 @@ async def corofn():
24132413
coro_repr = repr(coro)
24142414

24152415
# clear reference to the coroutine without awaiting for it
2416-
coro_repr = repr(coro)
24172416
del coro
24182417
support.gc_collect()
24192418

0 commit comments

Comments
 (0)