mirror of
https://github.com/python/cpython.git
synced 2025-11-10 18:42:04 +00:00
[3.13] gh-133167: Fix compilation process with --enable-optimizations and --without-docstrings (GH-133187) (#133207)
gh-133167: Fix compilation process with `--enable-optimizations` and `--without-docstrings` (GH-133187)
(cherry picked from commit cc39b19f0f)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
0458554482
commit
704a3f8c0a
4 changed files with 10 additions and 5 deletions
|
|
@ -2770,7 +2770,7 @@ def static_func(arg: int) -> str:
|
|||
self.assertEqual(meth.__qualname__, prefix + meth.__name__)
|
||||
self.assertEqual(meth.__doc__,
|
||||
('My function docstring'
|
||||
if support.HAVE_DOCSTRINGS
|
||||
if support.HAVE_PY_DOCSTRINGS
|
||||
else None))
|
||||
self.assertEqual(meth.__annotations__['arg'], int)
|
||||
|
||||
|
|
@ -2862,7 +2862,7 @@ def decorated_classmethod(cls, arg: int) -> str:
|
|||
with self.subTest(meth=meth):
|
||||
self.assertEqual(meth.__doc__,
|
||||
('My function docstring'
|
||||
if support.HAVE_DOCSTRINGS
|
||||
if support.HAVE_PY_DOCSTRINGS
|
||||
else None))
|
||||
self.assertEqual(meth.__annotations__['arg'], int)
|
||||
|
||||
|
|
@ -3317,7 +3317,7 @@ def test_access_from_class(self):
|
|||
def test_doc(self):
|
||||
self.assertEqual(CachedCostItem.cost.__doc__,
|
||||
("The cost of the item."
|
||||
if support.HAVE_DOCSTRINGS
|
||||
if support.HAVE_PY_DOCSTRINGS
|
||||
else None))
|
||||
|
||||
def test_module(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue