Merge pull request #3545 from blueyed/int

Improve display of hint about --fulltrace with KeyboardInterrupt
This commit is contained in:
Bruno Oliveira 2018-06-07 20:03:06 -03:00 committed by GitHub
commit f389a4e91f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View File

@ -0,0 +1 @@
Improve display of hint about ``--fulltrace`` with ``KeyboardInterrupt``.

View File

@ -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):

View File

@ -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*"])