diff options
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/collector.py | 5 | ||||
-rw-r--r-- | coverage/htmlfiles/style.css | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/coverage/collector.py b/coverage/collector.py index 3156b161..a296b227 100644 --- a/coverage/collector.py +++ b/coverage/collector.py @@ -38,10 +38,12 @@ class FileDisposition(object): def should_start_context(frame): + """Who-Tests-What hack: Determine whether this frame begins a new who-context.""" fn_name = frame.f_code.co_name if fn_name.startswith("test"): return fn_name + class Collector(object): """Collects trace data. @@ -326,6 +328,9 @@ class Collector(object): self._start_tracer() def switch_context(self, new_context): + """Who-Tests-What hack: switch to a new who-context.""" + # Make a new data dict, or find the existing one, and switch all the + # tracers to use it. data = self.contexts.setdefault(new_context, {}) for tracer in self.tracers: tracer.data = data diff --git a/coverage/htmlfiles/style.css b/coverage/htmlfiles/style.css index 4214af5b..186b085b 100644 --- a/coverage/htmlfiles/style.css +++ b/coverage/htmlfiles/style.css @@ -342,4 +342,3 @@ td.text { min-height: 3px; width: 100%; } - |