Include py version in the terminal output
This can help to reproduce bugs when looking at the output pasted into bug reports.
This commit is contained in:
parent
1ffc006363
commit
e12fe64b54
|
@ -259,7 +259,7 @@ class TerminalReporter:
|
||||||
if hasattr(sys, 'pypy_version_info'):
|
if hasattr(sys, 'pypy_version_info'):
|
||||||
verinfo = ".".join(map(str, sys.pypy_version_info[:3]))
|
verinfo = ".".join(map(str, sys.pypy_version_info[:3]))
|
||||||
msg += "[pypy-%s-%s]" % (verinfo, sys.pypy_version_info[3])
|
msg += "[pypy-%s-%s]" % (verinfo, sys.pypy_version_info[3])
|
||||||
msg += " -- pytest-%s" % (pytest.__version__)
|
msg += " -- py-%s -- pytest-%s" % (py.__version__, pytest.__version__)
|
||||||
if self.verbosity > 0 or self.config.option.debug or \
|
if self.verbosity > 0 or self.config.option.debug or \
|
||||||
getattr(self.config.option, 'pastebin', None):
|
getattr(self.config.option, 'pastebin', None):
|
||||||
msg += " -- " + str(sys.executable)
|
msg += " -- " + str(sys.executable)
|
||||||
|
|
|
@ -408,8 +408,9 @@ class TestTerminalFunctional:
|
||||||
verinfo = ".".join(map(str, py.std.sys.version_info[:3]))
|
verinfo = ".".join(map(str, py.std.sys.version_info[:3]))
|
||||||
result.stdout.fnmatch_lines([
|
result.stdout.fnmatch_lines([
|
||||||
"*===== test session starts ====*",
|
"*===== test session starts ====*",
|
||||||
"platform %s -- Python %s*" % (
|
"platform %s -- Python %s* -- py-%s -- pytest-%s" % (
|
||||||
py.std.sys.platform, verinfo), # , py.std.sys.executable),
|
py.std.sys.platform, verinfo,
|
||||||
|
py.__version__, pytest.__version__),
|
||||||
"*test_header_trailer_info.py .",
|
"*test_header_trailer_info.py .",
|
||||||
"=* 1 passed in *.[0-9][0-9] seconds *=",
|
"=* 1 passed in *.[0-9][0-9] seconds *=",
|
||||||
])
|
])
|
||||||
|
|
Loading…
Reference in New Issue