summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/collector.py6
-rw-r--r--igor.py2
2 files changed, 6 insertions, 2 deletions
diff --git a/coverage/collector.py b/coverage/collector.py
index 0348bb72..c1560902 100644
--- a/coverage/collector.py
+++ b/coverage/collector.py
@@ -247,7 +247,11 @@ class Collector(object):
def stop(self):
"""Stop collecting trace information."""
assert self._collectors
- assert self._collectors[-1] is self
+ assert self._collectors[-1] is self, (
+ "Expected current collector to be %r, but it's %r" % (
+ self, self._collectors[-1],
+ )
+ )
self.pause()
self.tracers = []
diff --git a/igor.py b/igor.py
index 8e9410bc..17f4114b 100644
--- a/igor.py
+++ b/igor.py
@@ -61,7 +61,6 @@ def run_tests(tracer, *nose_args):
return
print_banner(label)
- os.environ["COVERAGE_TEST_TRACER"] = tracer
nose_args = ["nosetests"] + list(nose_args)
nose.core.main(argv=nose_args)
@@ -136,6 +135,7 @@ def do_combine_html():
def do_test_with_tracer(tracer, *noseargs):
"""Run nosetests with a particular tracer."""
+ os.environ["COVERAGE_TEST_TRACER"] = tracer
if os.environ.get("COVERAGE_COVERAGE", ""):
return run_tests_with_coverage(tracer, *noseargs)
else: