holger krekel avatar holger krekel committed 3dd8814

simplify tox reporting output, fix link in docs

Comments (0)

Files changed (4)


 .. _`Michael Foord`: http://www.voidspace.org.uk/
-.. _tox.ini: http://code.google.com/p/mock/source/browse/trunk/tox.ini
+.. _tox.ini: http://code.google.com/p/mock/source/browse/tox.ini
 `Michael Foord`_ has contributed a ``tox.ini`` file that
 allows you to run all tests for his mock_ project,


     assert not result.ret
-        "  *reusing*",
+        "*reusing*",
 def test_env_PYTHONDONTWRITEBYTECODE(initproj, cmd, monkeypatch):
         self.args = args
         self.id = venv and venv.envconfig.envname or "tox"
         self._popenlist = []
+        if self.venv:
+            self.venvname = self.venv.name
+        else:
+            self.venvname = "GLOB"
     def setactivity(self, name, msg):
         self.activity = name
-        self.report.verbosity0("  %s: %s" %(name, msg), bold=True)
+        self.report.verbosity0("%s %s: %s" %(self.venvname, name, msg),
+            bold=True)
     def _initlogpath(self, actionid):
         if self.venv:
     def logaction(self, action):
         msg = action.msg
         msg += " " + " ".join(map(str, action.args))
-        self.logline(self.actionchar +
-            " %s %s" % (action.id, msg,), bold=True)
+        self.logline("%s %s" % (action.venvname, msg,), bold=True)
     def info(self, msg):
         if self.session.config.opts.verbosity >= 2:
     def runtestenv(self, venv, sdist_path, redirect=False):
         if not self.config.opts.notest:
-            testaction = self.newaction(venv, "testing")
+            testaction = self.newaction(venv, "runtests")
             if self.venvstatus[venv.path]:
             if venv.test(testaction, redirect=redirect):
         self.path = envconfig.envdir
         self.path_config = self.path.join(".tox-config1")
+    @property
+    def name(self):
+        return self.envconfig.envname
     def __repr__(self):
         return "<VirtualEnv at %r>" %(self.path)
     def install_sdist(self, sdistpath):
         if getattr(self, 'just_created', False):
-            action = self.session.newaction(None, "sdist-inst", sdistpath)
+            action = self.session.newaction(self, "sdist-inst", sdistpath)
             extraopts = []
-            action = self.session.newaction(None, "sdist-reinst", sdistpath)
+            action = self.session.newaction(self, "sdist-reinst", sdistpath)
             extraopts = ['-U', '--no-deps']
         self._install([sdistpath], extraopts=extraopts, action=action)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.