File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff 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)
You can’t perform that action at this time.
0 commit comments