File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ def assert_idom_logged(
197197 error_pattern = re .compile (match_error )
198198
199199 try :
200- with capture_idom_logs (use_existing = clear_matched_records ) as log_records :
200+ with capture_idom_logs (yield_existing = clear_matched_records ) as log_records :
201201 yield None
202202 except Exception :
203203 raise
@@ -281,16 +281,18 @@ def _raise_log_message_error(
281281
282282
283283@contextmanager
284- def capture_idom_logs (use_existing : bool = False ) -> Iterator [list [logging .LogRecord ]]:
284+ def capture_idom_logs (
285+ yield_existing : bool = False ,
286+ ) -> Iterator [list [logging .LogRecord ]]:
285287 """Capture logs from IDOM
286288
287289 Parameters:
288- use_existing :
290+ yield_existing :
289291 If already inside an existing capture context yield the same list of logs.
290292 This is useful if you need to mutate the list of logs to affect behavior in
291293 the outer context.
292294 """
293- if use_existing :
295+ if yield_existing :
294296 for handler in reversed (ROOT_LOGGER .handlers ):
295297 if isinstance (handler , _LogRecordCaptor ):
296298 yield handler .records
You can’t perform that action at this time.
0 commit comments