summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_coroutines.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2023-12-23 09:56:30 (GMT)
committerGitHub <noreply@github.com>2023-12-23 09:56:30 (GMT)
commit4e5b27e6a3be85853bd04d45128dd7cc706bb1c8 (patch)
tree2b82e7eaaff8888196988d7e6f147ca4f159d426 /Lib/test/test_coroutines.py
parentc3f92f6a7513340dfe2d82bfcd38eb77453e935d (diff)
downloadcpython-4e5b27e6a3be85853bd04d45128dd7cc706bb1c8.zip
cpython-4e5b27e6a3be85853bd04d45128dd7cc706bb1c8.tar.gz
cpython-4e5b27e6a3be85853bd04d45128dd7cc706bb1c8.tar.bz2
gh-81682: Fix test failures when CPython is built without docstrings (GH-113410)
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