From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 6 Jun 2022 01:42:21 +0000 (-0700) Subject: gh-93247: Fix assert function in asyncio locks test (GH-93248) X-Git-Tag: v3.10.5~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fd247db57a536d62902b296af599505298fd1e70;p=thirdparty%2FPython%2Fcpython.git gh-93247: Fix assert function in asyncio locks test (GH-93248) (cherry picked from commit 9081bbd036934ab435291db9d32d02fd42282951) Co-authored-by: Cyker Way --- diff --git a/Lib/test/test_asyncio/test_locks.py b/Lib/test/test_asyncio/test_locks.py index c5e3fdcbc955..167ae700e5c0 100644 --- a/Lib/test/test_asyncio/test_locks.py +++ b/Lib/test/test_asyncio/test_locks.py @@ -866,7 +866,7 @@ class SemaphoreTests(unittest.IsolatedAsyncioTestCase): self.assertTrue(t1.result()) race_tasks = [t2, t3, t4] done_tasks = [t for t in race_tasks if t.done() and t.result()] - self.assertTrue(2, len(done_tasks)) + self.assertEqual(2, len(done_tasks)) # cleanup locked semaphore sem.release()