From 67103f35b69d8f6d021608ab02fa0daab61b52c2 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Tue, 10 Feb 2015 21:12:25 -0500 Subject: Get the tracer right for metacov --- coverage/collector.py | 6 +++++- igor.py | 2 +- 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: -- cgit v1.2.1