1 new changeset in pytest: http://bitbucket.org/hpk42/pytest/changeset/f87840066573/ changeset: r2181:f87840066573 user: hpk42 date: 2011-03-08 13:44:53 summary: simplify _locationline helper affected #: 1 file (33 bytes)
--- a/_pytest/terminal.py Tue Mar 08 13:37:00 2011 +0100 +++ b/_pytest/terminal.py Tue Mar 08 13:44:53 2011 +0100 @@ -335,19 +335,19 @@ excrepr.reprcrash.toterminal(self._tw) def _locationline(self, collect_fspath, fspath, lineno, domain): + # collect_fspath comes from testid which has a "/"-normalized path if fspath and fspath.replace("\\", "/") != collect_fspath: fspath = "%s <- %s" % (collect_fspath, fspath) - if lineno is not None: - lineno += 1 - if fspath and lineno and domain: - line = "%(fspath)s:%(lineno)s: %(domain)s" - elif fspath and domain: - line = "%(fspath)s: %(domain)s" - elif fspath and lineno: - line = "%(fspath)s:%(lineno)s %(extrapath)s" + if fspath: + line = str(fspath) + if lineno is not None: + lineno += 1 + line += ":" + str(lineno) + if domain: + line += ": " + str(domain) else: - line = "[nolocation]" - return line % locals() + " " + line = "[location]" + return line + " " def _getfailureheadline(self, rep): if hasattr(rep, 'location'): Repository URL: https://bitbucket.org/hpk42/pytest/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email. _______________________________________________ py-svn mailing list py-svn@codespeak.net http://codespeak.net/mailman/listinfo/py-svn