holger krekel avatar holger krekel committed f75b1cb

- move status to become venv attribute
- remove py3k breaking print

Comments (0)

Files changed (3)


         assert len(envs) == 2
         env1, env2 = envs
         session.setenvstatus(env1, "FAIL XYZ")
-        assert session.venvstatus[env1.path]
+        assert env1.status
         session.setenvstatus(env2, 0)
-        assert not session.venvstatus[env2.path]
+        assert not env2.status
         out, err = capfd.readouterr()
         exp = "%s: FAIL XYZ" % env1.envconfig.envname
         if ret:
             invoked = " ".join(map(str, popen.args))
             if outpath:
-                self.report.error("invocation failed, logfile: %s" % outpath)
+                self.report.error("invocation failed, logfile: %s" %
+                                  outpath)
                 raise tox.exception.InvocationError(
                     "%s (see %s)" %(invoked, outpath))
 class Session:
-    passthroughpossible = True
     def __init__(self, config, popen=subprocess.Popen, Report=Reporter):
         self.config = config
         #self.report.using("logdir %s" %(self.config.logdir,))
         self.report.using("tox.ini: %s" %(self.config.toxinipath,))
-        self.venvstatus = {}
         self._spec2pkg = {}
         self._name2venv = {}
         return action
     def runcommand(self):
-        #tw.sep("-", "tox info from %s" % self.options.configfile)
-        self.report.using("tox-%s from %s" %(tox.__version__, tox.__file__))
+        self.report.using("tox-%s from %s" %(tox.__version__,
+                                             tox.__file__))
         if self.config.minversion:
             minversion = NormalizedVersion(self.config.minversion)
             toxversion = NormalizedVersion(tox.__version__)
-            #self.report.using("requires at least %s" %(minversion,))
             if toxversion < minversion:
                     "tox version is %s, required is at least %s" %(
     def setenvstatus(self, venv, msg):
-        self.venvstatus[venv.path] = msg
+        venv.status = msg
     def _makesdist(self):
         setup = self.config.setupdir.join("setup.py")
     def setupenv(self, venv):
         action = self.newaction(venv, "getenv", venv.envconfig.envdir)
         with action:
-            self.venvstatus[venv.path] = 0
+            venv.status = 0
                 status = venv.update(action=action)
             except tox.exception.InvocationError:
     def runtestenv(self, venv, sdist_path, redirect=False):
         if not self.config.option.notest:
-            if self.venvstatus[venv.path]:
+            if venv.status:
             if venv.test(redirect=redirect):
                 self.setenvstatus(venv, "commands failed")
         retcode = 0
         for venv in self.venvlist:
-            status = self.venvstatus[venv.path]
+            status = venv.status
             if status and status != "skipped tests":
                 msg = "  %s: %s" %(venv.envconfig.envname, str(status))
                 if not status:
                     status = "commands succeeded"
-                self.report.good("  %s: %s" %(venv.envconfig.envname, status))
+                self.report.good("  %s: %s" %(venv.envconfig.envname,
+                                              status))
         if not retcode:
             self.report.good("  congratulations :)")
         return retcode
         if override:
             for name in config.indexserver:
                 config.indexserver[name] = IndexServerConfig(name, override)
-                print name, config.indexserver[name]
         config.distdir = reader.getpath(toxsection, "distdir",
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.