File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1487,7 +1487,9 @@ def lineinfo(self, identifier):
14871487 f = self .lookupmodule (parts [0 ])
14881488 if f :
14891489 fname = f
1490- item = parts [1 ]
1490+ item = parts [1 ]
1491+ else :
1492+ return failed
14911493 answer = find_function (item , self .canonic (fname ))
14921494 return answer or failed
14931495
Original file line number Diff line number Diff line change @@ -4587,6 +4587,31 @@ def bar():
45874587 ]))
45884588 self .assertIn ('break in bar' , stdout )
45894589
4590+ def test_issue_59000 (self ):
4591+ script = """
4592+ def foo():
4593+ pass
4594+
4595+ class C:
4596+ def c_foo(self):
4597+ pass
4598+ def foo(self):
4599+ pass
4600+
4601+ foo()
4602+ """
4603+ commands = """
4604+ break foo
4605+ break C.foo
4606+ break C.c_foo
4607+ break 10
4608+ continue
4609+ break C.foo
4610+ quit
4611+ """
4612+ stdout , stderr = self .run_pdb_script (script , commands )
4613+ self .assertIn ("The specified object 'C.c_foo' is not a function" , stdout )
4614+
45904615
45914616class ChecklineTests (unittest .TestCase ):
45924617 def setUp (self ):
You can’t perform that action at this time.
0 commit comments