summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2012-08-30 23:13:52 -0400
committerNed Batchelder <ned@nedbatchelder.com>2012-08-30 23:13:52 -0400
commitd3d18ec78998cdd440601563c16f6b851072d501 (patch)
tree678d0695996a6d517d791bf6d78771599be23eef /coverage
parent37acba7e0c90b82cc0571e5f1eb6913d9ed29e51 (diff)
downloadpython-coveragepy-d3d18ec78998cdd440601563c16f6b851072d501.tar.gz
Undo Brett's change to the fullcoverage feature: it should only be used with the C tracer.
Diffstat (limited to 'coverage')
-rw-r--r--coverage/collector.py3
-rw-r--r--coverage/fullcoverage/encodings.py7
2 files changed, 6 insertions, 4 deletions
diff --git a/coverage/collector.py b/coverage/collector.py
index 3821de0..743a03e 100644
--- a/coverage/collector.py
+++ b/coverage/collector.py
@@ -259,7 +259,8 @@ class Collector(object):
fn = self._start_tracer()
for args in traces0:
- fn(*args)
+ (frame, event, arg), lineno = args
+ fn(frame, event, arg, lineno=lineno)
# Install our installation tracer in threading, to jump start other
# threads.
diff --git a/coverage/fullcoverage/encodings.py b/coverage/fullcoverage/encodings.py
index 539d2dd..ad350bc 100644
--- a/coverage/fullcoverage/encodings.py
+++ b/coverage/fullcoverage/encodings.py
@@ -31,7 +31,8 @@ class FullCoverageTracer(object):
self.traces = []
def fullcoverage_trace(self, *args):
- self.traces.append(args)
+ frame, event, arg = args
+ self.traces.append((args, frame.f_lineno))
return self.fullcoverage_trace
sys.settrace(FullCoverageTracer().fullcoverage_trace)
@@ -42,7 +43,7 @@ sys.settrace(FullCoverageTracer().fullcoverage_trace)
# happen last, since all of the symbols in this module will become None
# at that exact moment, including "sys".
-parentdirs = sorted(filter(__file__.startswith, sys.path), key=len)
-sys.path.remove(parentdirs[-1])
+parentdir = max(filter(__file__.startswith, sys.path), key=len)
+sys.path.remove(parentdir)
del sys.modules['encodings']
import encodings