10000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bb94f4 commit e1994c4Copy full SHA for e1994c4
Lib/test/test_compile.py
@@ -704,7 +704,7 @@ def test_strip_unused_consts(self):
704
def f1():
705
"docstring"
706
return 42
707
- self.assertEqual(f1.__code__.co_consts, ("docstring", 42))
+ self.assertEqual(f1.__code__.co_consts, (f1.__doc__, 42))
708
709
# This is a regression test for a CPython specific peephole optimizer
710
# implementation bug present in a few releases. It's assertion verifies
@@ -935,6 +935,8 @@ def no_code2():
935
936
for func in (no_code1, no_code2):
937
with self.subTest(func=func):
938
+ if func is no_code1 and no_code1.__doc__ is None:
939
+ continue
940
code = func.__code__
941
lines = list(code.co_lines())
942
start, end, line = lines[0]
0 commit comments