summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--coverage/collector.py9
-rw-r--r--test/test_farm.py3
2 files changed, 5 insertions, 7 deletions
diff --git a/coverage/collector.py b/coverage/collector.py
index bf465939..96a9661b 100644
--- a/coverage/collector.py
+++ b/coverage/collector.py
@@ -2,8 +2,6 @@
import os, sys, threading
-from coverage.misc import short_stack
-
try:
# Use the C extension code when we can, for speed.
from coverage.tracer import CTracer # pylint: disable=F0401,E0611
@@ -126,8 +124,11 @@ class PyTracer(object):
"""Stop this Tracer."""
if hasattr(sys, "gettrace") and self.warn:
if sys.gettrace() != self._trace:
- msg = "Trace function changed, measurement is likely wrong: %r\n%s"
- self.warn(msg % (sys.gettrace(), short_stack()))
+ msg = "Trace function changed, measurement is likely wrong: %r"
+ self.warn(msg % (sys.gettrace(),))
+ #--debug
+ #from coverage.misc import short_stack
+ #self.warn(msg % (sys.gettrace()))#, short_stack()))
sys.settrace(None)
def get_stats(self):
diff --git a/test/test_farm.py b/test/test_farm.py
index 418a3cf5..c343e2f7 100644
--- a/test/test_farm.py
+++ b/test/test_farm.py
@@ -7,7 +7,6 @@ sys.path.insert(0, os.path.split(__file__)[0]) # Force relative import for Py3k
from backtest import run_command, execfile # pylint: disable=W0622
from coverage.control import _TEST_NAME_FILE
-from coverage.misc import short_stack
def test_farm(clean_only=False):
@@ -95,8 +94,6 @@ class FarmTestCase(object):
# Remove any new modules imported during the test run. This lets us
# import the same source files for more than one test.
to_del = [m for m in sys.modules if m not in old_mods]
- with open(r"\foo\cov.txt", "a") as f:
- print >>f, ("Deleting modules: %s, %r\n%s" % (self.description, to_del, short_stack()))
for m in to_del:
del sys.modules[m]