Commits

holger krekel  committed 3dd8814

simplify tox reporting output, fix link in docs

  • Participants
  • Parent commits 62e7e80

Comments (0)

Files changed (4)

File doc/example/unittest.txt

 -----------------------------------------------------
 
 .. _`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,

File tests/test_z_cmdline.py

     assert not result.ret
     result.stdout.fnmatch_lines([
         "*py25*prepareenv*",
-        "  *reusing*",
+        "*reusing*",
     ])
 
 def test_env_PYTHONDONTWRITEBYTECODE(initproj, cmd, monkeypatch):

File tox/_cmdline.py

         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]:
                 return
             if venv.test(testaction, redirect=redirect):

File tox/_venv.py

         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)
             self._getliveconfig().writeconfig(self.path_config)
             extraopts = []
         else:
-            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)