summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_coroutines.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-12-23 11:50:01 (GMT)
committerGitHub <noreply@github.com>2023-12-23 11:50:01 (GMT)
commitfc4d2c3dc66d34eddadd1208984a38a46757d6da (patch)
treeadd33c148a7a277d33079ccd20f96bb87c44bd3b /Lib/test/test_coroutines.py
parentfee2bc15f9a22016dce5d8248caf320cfb48e9b6 (diff)
downloadcpython-fc4d2c3dc66d34eddadd1208984a38a46757d6da.zip
cpython-fc4d2c3dc66d34eddadd1208984a38a46757d6da.tar.gz
cpython-fc4d2c3dc66d34eddadd1208984a38a46757d6da.tar.bz2
[3.12] gh-81682: Fix test failures when CPython is built without docstrings (GH-113410) (GH-113429)
(cherry picked from commit 4e5b27e6a3be85853bd04d45128dd7cc706bb1c8)
Diffstat (limited to 'Lib/test/test_coroutines.py')
-rw-r--r--Lib/test/test_coroutines.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/test/test_coroutines.py b/Lib/test/test_coroutines.py
index 25c981d..d848bfb 100644
--- a/Lib/test/test_coroutines.py
+++ b/Lib/test/test_coroutines.py
@@ -953,11 +953,12 @@ class CoroutineTest(unittest.TestCase):
def test_corotype_1(self):
ct = types.CoroutineType
- self.assertIn('into coroutine', ct.send.__doc__)
- self.assertIn('inside coroutine', ct.close.__doc__)
- self.assertIn('in coroutine', ct.throw.__doc__)
- self.assertIn('of the coroutine', ct.__dict__['__name__'].__doc__)
- self.assertIn('of the coroutine', ct.__dict__['__qualname__'].__doc__)
+ if not support.MISSING_C_DOCSTRINGS:
+ self.assertIn('into coroutine', ct.send.__doc__)
+ self.assertIn('inside coroutine', ct.close.__doc__)
+ self.assertIn('in coroutine', ct.throw.__doc__)
+ self.assertIn('of the coroutine', ct.__dict__['__name__'].__doc__)
+ self.assertIn('of the coroutine', ct.__dict__['__qualname__'].__doc__)
self.assertEqual(ct.__name__, 'coroutine')
async def f(): pass