https://github.com/python/cpython/commit/e5c3b7e34974dcd6d7f6a1a50030bf7fbce38e74
commit: e5c3b7e34974dcd6d7f6a1a50030bf7fbce38e74
branch: main
author: Victor Stinner <[email protected]>
committer: vstinner <[email protected]>
date: 2025-02-05T11:43:46Z
summary:
gh-129354: Cleanup test_coroutines (#129684)
Remove unused variables.
files:
M Lib/test/test_coroutines.py
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index 5566c9803d43ed..ae3cd3555002ef 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -735,7 +735,7 @@ async def func(): pass
def test_func_12(self):
async def g():
- i = me.send(None)
+ me.send(None)
await foo
me = g()
with self.assertRaisesRegex(ValueError,
@@ -2283,7 +2283,7 @@ async def __aexit__(self, exc_type, exc_val, exc_tb):
buffer.append(exc_type.__name__)
async def f():
- async with CM() as c:
+ async with CM():
await asyncio.sleep(0.01)
raise MyException
buffer.append('unreachable')
@@ -2375,7 +2375,7 @@ def check(depth, msg):
orig_depth = sys.get_coroutine_origin_tracking_depth()
try:
- msg = check(0, f"coroutine '{corofn.__qualname__}' was never
awaited")
+ check(0, f"coroutine '{corofn.__qualname__}' was never awaited")
check(1, "".join([
f"coroutine '{corofn.__qualname__}' was never awaited\n",
"Coroutine created at (most recent call last)\n",
@@ -2413,7 +2413,6 @@ async def corofn():
coro_repr = repr(coro)
# clear reference to the coroutine without awaiting for it
- coro_repr = repr(coro)
del coro
support.gc_collect()
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]