Report 'call' phase as 'live log call'
As commented in review, this makes it consistent with the headers shown by stdout/stderr capturing ("Captured log call")
This commit is contained in:
parent
9f4688e549
commit
113bfb6be8
|
@ -409,8 +409,7 @@ class _LiveLoggingStreamHandler(logging.StreamHandler):
|
|||
self.stream.write('\n')
|
||||
self._first_record_emitted = True
|
||||
if not self._section_name_shown:
|
||||
header = 'live log' if self._when == 'call' else 'live log ' + self._when
|
||||
self.stream.section(header, sep='-', bold=True)
|
||||
self.stream.section('live log ' + self._when, sep='-', bold=True)
|
||||
self._section_name_shown = True
|
||||
logging.StreamHandler.emit(self, record)
|
||||
finally:
|
||||
|
|
|
@ -254,7 +254,7 @@ def test_log_cli_default_level_sections(testdir, request):
|
|||
'{}::test_log_1 '.format(filename),
|
||||
'*-- live log setup --*',
|
||||
'*WARNING*log message from setup of test_log_1*',
|
||||
'*-- live log --*',
|
||||
'*-- live log call --*',
|
||||
'*WARNING*log message from test_log_1*',
|
||||
'PASSED *50%*',
|
||||
'*-- live log teardown --*',
|
||||
|
@ -263,7 +263,7 @@ def test_log_cli_default_level_sections(testdir, request):
|
|||
'{}::test_log_2 '.format(filename),
|
||||
'*-- live log setup --*',
|
||||
'*WARNING*log message from setup of test_log_2*',
|
||||
'*-- live log --*',
|
||||
'*-- live log call --*',
|
||||
'*WARNING*log message from test_log_2*',
|
||||
'PASSED *100%*',
|
||||
'*-- live log teardown --*',
|
||||
|
|
Loading…
Reference in New Issue