diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-07-12 09:20:49 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-07-12 09:20:49 -0400 |
commit | f8c89008f9809137edf63e756a1d0d891500b771 (patch) | |
tree | 6b266596e9170fd7ee5819923e7ea7cbf62a6e03 /coverage/collector.py | |
parent | 4bb849f39914138316b33dec2ddb427fb5142b41 (diff) | |
download | python-coveragepy-git-f8c89008f9809137edf63e756a1d0d891500b771.tar.gz |
Narrow the amount of code in a coverage start/stop window in a test so that the differences in 2.x and 3.x scoping rules don't change the results of the test. Also, some commented-out logging of the trace machinery that helped me find the problem. Now all tests pass on Python 3.1!
Diffstat (limited to 'coverage/collector.py')
-rw-r--r-- | coverage/collector.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/coverage/collector.py b/coverage/collector.py index 0a5349ad..940f7c75 100644 --- a/coverage/collector.py +++ b/coverage/collector.py @@ -20,6 +20,7 @@ except ImportError: def _global_trace(self, frame, event, arg_unused): """The trace function passed to sys.settrace.""" + #print "global event: %s %r" % (event, frame.f_code.co_filename) if event == 'call': # Entering a new function context. Decide if we should trace # in this file. @@ -42,6 +43,7 @@ except ImportError: def _local_trace(self, frame, event, arg_unused): """The trace function used within a function.""" + #print "local event: %s %r" % (event, frame.f_code.co_filename) if self.last_exc_back: if frame == self.last_exc_back: # Someone forgot a return event. |