Black changes.

This commit is contained in:
victor 2018-08-18 14:27:09 +02:00
parent 9fa7745795
commit eb2d074530
2 changed files with 6 additions and 2 deletions

View File

@ -121,7 +121,7 @@ class CaptureManager(object):
finally:
cap.suspend_capturing(in_=in_)
return outerr
@contextlib.contextmanager
def _dummy_context_manager(self):
yield

View File

@ -572,7 +572,11 @@ class _LiveLoggingStreamHandler(logging.StreamHandler):
self._test_outcome_written = False
def emit(self, record):
ctx_manager = self.capture_manager.disabled() if self.capture_manager else _dummy_context_manager()
ctx_manager = (
self.capture_manager.disabled()
if self.capture_manager
else _dummy_context_manager()
)
with ctx_manager:
if not self._first_record_emitted:
self.stream.write("\n")