Skip to content

Commit 4de616a

Browse files
AndPuQingiritkatriel15r10nk
committed
add unit tests
Co-authored-by: Irit Katriel <[email protected]> Co-authored-by: Frank Hoffmann <[email protected]>
1 parent 97bddb8 commit 4de616a

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

Lib/test/test_pdb.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3816,6 +3816,31 @@ def bar():
38163816
self.assertIn('-> pass', lines)
38173817
self.assertIn('(Pdb) 42', lines)
38183818

3819+
def test_issue135700(self):
3820+
"""https://github.com/python/cpython/issues/135700"""
3821+
module_code = """\
3822+
22
3823+
3824+
class ClassVar:
3825+
pass
3826+
__dataclass_fields__: ClassVar
3827+
"""
3828+
with open("testmod.py", "w") as f:
3829+
f.write(module_code)
3830+
self.addCleanup(os_helper.unlink, "testmod.py")
3831+
3832+
script = """
3833+
import testmod
3834+
print(testmod.__annotations__)
3835+
"""
3836+
commands = """
3837+
b testmod.py:1
3838+
c
3839+
c
3840+
"""
3841+
result = self.run_pdb_script(script, commands)
3842+
self.assertNotIn("(1)__annotate__()", result[0])
3843+
38193844
def test_step_into_botframe(self):
38203845
# gh-125422
38213846
# pdb should not be able to step into the botframe (bdb.py)

0 commit comments

Comments
 (0)