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 | 819358c150ea29f471580e4176d714bbcbc0b96d (patch) | |
tree | ae0db4e058adf44a9554469304673d26f23a168f /coverage/control.py | |
parent | efd4240423fc6cfae9710bd11dcc64d80792b883 (diff) | |
download | python-coveragepy-819358c150ea29f471580e4176d714bbcbc0b96d.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/control.py')
-rw-r--r-- | coverage/control.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coverage/control.py b/coverage/control.py index b0e7512..0d19a56 100644 --- a/coverage/control.py +++ b/coverage/control.py @@ -119,6 +119,14 @@ class coverage: return canonical + # To log what should_trace returns, change this to "if 1:" + if 0: + _real_should_trace = _should_trace + def _should_trace(self, filename, frame): + ret = self._real_should_trace(filename, frame) + print "should_trace: %r -> %r" % (filename, ret) + return ret + def use_cache(self, usecache): """Control the use of a data file (incorrectly called a cache). |