call site 1 for code.Source.getstatementrange
code/testing/test_excinfo.py - line 25
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
   def test_excinfo_getstatement():
       def g():
           raise ValueError
       def f():
           g()
       try:
           f()
       except ValueError:
           excinfo = py.code.ExceptionInfo()
       linenumbers = [f.func_code.co_firstlineno-1+3,
                      f.func_code.co_firstlineno-1+1,
                      g.func_code.co_firstlineno-1+1,]
       l = list(excinfo.traceback)
       foundlinenumbers = [x.lineno for x in l]
->     print l[0].frame.statement
       assert foundlinenumbers == linenumbers
code/frame.py - line 16
15
16
   def statement(self):
->     return self.code.fullsource.getstatement(self.lineno)
code/source.py - line 95
91
92
93
94
95
96
   def getstatement(self, lineno):
       """ return Source statement which contains the
               given linenumber (counted from 0).
           """
->     start, end = self.getstatementrange(lineno)
       return self[start:end]