diff options
author | Jeffrey Yasskin <jyasskin@gmail.com> | 2009-05-18 21:14:54 (GMT) |
---|---|---|
committer | Jeffrey Yasskin <jyasskin@gmail.com> | 2009-05-18 21:14:54 (GMT) |
commit | 61328eef1fdb8f8bb292e07839be55e917ae4f7a (patch) | |
tree | 5e89e77dc7d76a415de6a488b4af8a39dd2f5547 /Lib/test | |
parent | fceb5d478fcc43b764a9d1ad0a90e098828a7f64 (diff) | |
download | cpython-61328eef1fdb8f8bb292e07839be55e917ae4f7a.zip cpython-61328eef1fdb8f8bb292e07839be55e917ae4f7a.tar.gz cpython-61328eef1fdb8f8bb292e07839be55e917ae4f7a.tar.bz2 |
While I was modifying test_trace, it threw an exception when I accidentally
made it try to set the line number from the trace callback for a 'call' event.
This patch makes the error message a little more helpful in that case, and
makes it a little less likely that a future editor will make the same mistake
in test_trace.
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_trace.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py index b5db9a7..a8f5163 100644 --- a/Lib/test/test_trace.py +++ b/Lib/test/test_trace.py @@ -471,7 +471,7 @@ class JumpTracer: def trace(self, frame, event, arg): if not self.done and frame.f_code == self.function.func_code: firstLine = frame.f_code.co_firstlineno - if frame.f_lineno == firstLine + self.jumpFrom: + if event == 'line' and frame.f_lineno == firstLine + self.jumpFrom: # Cope with non-integer self.jumpTo (because of # no_jump_to_non_integers below). try: |