2 new commits in pytest:
https://bitbucket.org/hpk42/pytest/commits/50fa30ff660b/
Changeset: 50fa30ff660b
Branch: quiet-color-summary
User: pelme
Date: 2013-08-05 09:45:10
Summary: Added color to the quite mode summary. Also changed the output
format
slightly to match the output of the standard summary.
Affected #: 1 file
diff -r a36faafd111e3ef317b18f4fe86054bdfaaa4301 -r
50fa30ff660b70f4f8d60be07c8f89930afd1140 _pytest/terminal.py
--- a/_pytest/terminal.py
+++ b/_pytest/terminal.py
@@ -455,19 +455,17 @@
parts.append("%d %s" % (len(val), key))
line = ", ".join(parts)
msg = "%s in %.2f seconds" % (line, session_duration)
+
+ markup = {'bold': True}
+ if 'failed' in self.stats or 'error' in self.stats:
+ markup = {'red': True, 'bold': True}
+ else:
+ markup = {'green': True, 'bold': True}
+
if self.verbosity >= 0:
- markup = dict(bold=True)
- if 'failed' in self.stats or 'error' in self.stats:
- markup['red'] = True
- else:
- markup['green'] = True
self.write_sep("=", msg, **markup)
if self.verbosity == -1:
- if line:
- self.write("%s, " % line)
- self.write("time: %.2f seconds\n" % session_duration)
- #else:
- # self.write_line(msg, bold=True)
+ self.write_line(msg, **markup)
def summary_deselected(self):
if 'deselected' in self.stats:
https://bitbucket.org/hpk42/pytest/commits/4433813f9fbb/
Changeset: 4433813f9fbb
User: hpk42
Date: 2013-08-06 15:38:43
Summary: Merged in pelme/pytest/quiet-color-summary (pull request #61)
Added color to the quite mode summary
Affected #: 1 file
diff -r a36faafd111e3ef317b18f4fe86054bdfaaa4301 -r
4433813f9fbb5e8de742e554c74d2dcc748e6fb8 _pytest/terminal.py
--- a/_pytest/terminal.py
+++ b/_pytest/terminal.py
@@ -455,19 +455,17 @@
parts.append("%d %s" % (len(val), key))
line = ", ".join(parts)
msg = "%s in %.2f seconds" % (line, session_duration)
+
+ markup = {'bold': True}
+ if 'failed' in self.stats or 'error' in self.stats:
+ markup = {'red': True, 'bold': True}
+ else:
+ markup = {'green': True, 'bold': True}
+
if self.verbosity >= 0:
- markup = dict(bold=True)
- if 'failed' in self.stats or 'error' in self.stats:
- markup['red'] = True
- else:
- markup['green'] = True
self.write_sep("=", msg, **markup)
if self.verbosity == -1:
- if line:
- self.write("%s, " % line)
- self.write("time: %.2f seconds\n" % session_duration)
- #else:
- # self.write_line(msg, bold=True)
+ self.write_line(msg, **markup)
def summary_deselected(self):
if 'deselected' in self.stats:
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.
_______________________________________________
pytest-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pytest-commit