https://github.com/python/cpython/commit/f20dfb7569a769da50cd75f4932b9abe78e55d75
commit: f20dfb7569a769da50cd75f4932b9abe78e55d75
branch: main
author: Nikita Sobolev <[email protected]>
committer: sobolevn <[email protected]>
date: 2024-03-14T13:16:18+03:00
summary:
gh-116780: Fix `test_inspect` in `-OO` mode (#116788)
files:
M Lib/test/test_inspect/test_inspect.py
diff --git a/Lib/test/test_inspect/test_inspect.py
b/Lib/test/test_inspect/test_inspect.py
index 9a9d34df236084..c3a9dc998e38d0 100644
--- a/Lib/test/test_inspect/test_inspect.py
+++ b/Lib/test/test_inspect/test_inspect.py
@@ -991,7 +991,11 @@ def test_class_decorator(self):
self.assertSourceEqual(mod2.cls196, 194, 201)
self.assertSourceEqual(mod2.cls196.cls200, 198, 201)
+ @support.requires_docstrings
def test_class_inside_conditional(self):
+ # We skip this test when docstrings are not present,
+ # because docstrings are one of the main factors of
+ # finding the correct class in the source code.
self.assertSourceEqual(mod2.cls238.cls239, 239, 240)
def test_multiple_children_classes(self):
@@ -5284,6 +5288,7 @@ def func(*args, **kwargs):
with self.assertRaises(ValueError):
inspect.signature(func)
+ @support.requires_docstrings
def test_base_class_have_text_signature(self):
# see issue 43118
from test.typinganndata.ann_module7 import BufferedReader
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]