]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-93247: Fix assert function in asyncio locks test (GH-93248)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 6 Jun 2022 01:42:21 +0000 (18:42 -0700)
committerGitHub <noreply@github.com>
Mon, 6 Jun 2022 01:42:21 +0000 (18:42 -0700)
(cherry picked from commit 9081bbd036934ab435291db9d32d02fd42282951)

Co-authored-by: Cyker Way <cykerway@gmail.com>
Lib/test/test_asyncio/test_locks.py

index c5e3fdcbc955a5c837a6636949020365b187469f..167ae700e5c077cd78ef249ddb0d77b1be8c9ade 100644 (file)
@@ -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()