Improve display of hint about --fulltrace with KeyboardInterrupt
- display the location first - display hint about --fulltrace in parenthesis
This commit is contained in:
parent
18157659ca
commit
c30c137a95
|
@ -0,0 +1 @@
|
||||||
|
Improve display of hint about --fulltrace with KeyboardInterrupt
|
|
@ -617,11 +617,11 @@ class TerminalReporter(object):
|
||||||
if self.config.option.fulltrace:
|
if self.config.option.fulltrace:
|
||||||
excrepr.toterminal(self._tw)
|
excrepr.toterminal(self._tw)
|
||||||
else:
|
else:
|
||||||
|
excrepr.reprcrash.toterminal(self._tw)
|
||||||
self._tw.line(
|
self._tw.line(
|
||||||
"to show a full traceback on KeyboardInterrupt use --fulltrace",
|
"(to show a full traceback on KeyboardInterrupt use --fulltrace)",
|
||||||
yellow=True,
|
yellow=True,
|
||||||
)
|
)
|
||||||
excrepr.reprcrash.toterminal(self._tw)
|
|
||||||
|
|
||||||
def _locationline(self, nodeid, fspath, lineno, domain):
|
def _locationline(self, nodeid, fspath, lineno, domain):
|
||||||
|
|
||||||
|
|
|
@ -203,7 +203,7 @@ class TestTerminal(object):
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
result.stdout.fnmatch_lines(
|
result.stdout.fnmatch_lines(
|
||||||
["to show a full traceback on KeyboardInterrupt use --fulltrace"]
|
["(to show a full traceback on KeyboardInterrupt use --fulltrace)"]
|
||||||
)
|
)
|
||||||
result.stdout.fnmatch_lines(["*KeyboardInterrupt*"])
|
result.stdout.fnmatch_lines(["*KeyboardInterrupt*"])
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue