[Python-checkins] gh-92886: make test_coroutines pass with -O (assertions off) (GH-98060)

miss-islington webhook-mailer at python.org
Sat Oct 8 00:07:14 EDT 2022


https://github.com/python/cpython/commit/8d40fbe48bf58295c8053fce2119be989c1e8948
commit: 8d40fbe48bf58295c8053fce2119be989c1e8948
branch: 3.10
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-10-07T21:07:09-07:00
summary:

gh-92886: make test_coroutines pass with -O (assertions off) (GH-98060)


Automerge-Triggered-By: GH:iritkatriel
(cherry picked from commit 45f21472daad3934baf364c3100063ecc51c6e04)

Co-authored-by: Irit Katriel <1055913+iritkatriel at users.noreply.github.com>

files:
M Lib/test/test_coroutines.py

diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index a414a6f505c9..acff24537cf8 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -1262,7 +1262,7 @@ async def __aexit__(self, *exc):
 
         async def func():
             async with CM():
-                assert (1, ) == 1
+                self.assertEqual((1, ), 1)
 
         with self.assertRaises(AssertionError):
             run_async(func())



More information about the Python-checkins mailing list