1. Ned Batchelder
  2. coverage.py


Ned Batchelder  committed a19c5f5

Clean up debugging stuff

  • Participants
  • Parent commits dcfc0f3
  • Branches default

Comments (0)

Files changed (2)

File coverage/collector.py

View file
  • Ignore whitespace
 import os, sys, threading
-from coverage.misc import short_stack
     # Use the C extension code when we can, for speed.
     from coverage.tracer import CTracer         # pylint: disable=F0401,E0611
         """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()))
     def get_stats(self):

File test/test_farm.py

View file
  • Ignore whitespace
 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):
             # 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]