Lines Matching defs:trace
1 # Testing the line trace facility.
318 def trace(self, frame, event, arg):
321 return self.trace
327 return self.trace
358 sys.settrace(tracer.trace)
369 func(tracer.trace)
420 # issue1265: if the trace function contains a generator,
422 # that is not completely exhausted, the trace stopped.
607 run(tracer.trace)
625 sys.settrace(tracer.trace)
1662 """Repeat the trace tests, but with per-line events skipped"""
1675 """Repeat the trace tests, but with per-opcodes events enabled"""
1693 def trace(self, frame, event, arg):
1694 """A trace function that raises an exception in response to a
1695 specific trace event."""
1699 return self.trace
1702 """The function to trace; raises an exception if that's the case
1703 we're testing, so that the 'exception' trace event fires."""
1716 sys.settrace(self.trace)
1726 # Test the handling of exceptions raised by each kind of trace event.
1765 type, exception, trace = arg
1782 def trace(frame, event, arg):
1786 return trace
1790 sys.settrace(trace)
1795 # 'Jump' tests: assigning to frame.f_lineno within a trace function
1800 """Defines a trace function that jumps from one place to another."""
1811 def trace(self, frame, event, arg):
1817 # trace event in 'function' to find the first line of 'function'.
1834 return self.trace
1851 # talks about trace functions.
1852 if 'trace' not in str(e):
1873 sys.settrace(tracer.trace)
1886 sys.settrace(tracer.trace)
2617 sys.settrace(tracer.trace)
2624 " the 'call' trace event of a new frame"))
2633 "can only jump from a 'line' trace event"))
2639 "can only jump from a 'line' trace event"))
2806 def trace(frame, event, arg):
2808 return trace
2810 sys.settrace(trace)