88 """With log_function_calls=True the [WRITE] prefix should appear in the log file."""
90 log_file = tmp_path /
'prefixed.log'
95 mode=CONST.StdMode.STDOUT,
96 log_function_calls=
True
98 ts.write(
'tagged line\n')
100 logfile = next(tmp_path.rglob(
'*.log'),
None)
101 assert logfile
is not None,
'No log file created'
102 content = logfile.read_text(encoding=
'utf-8')
103 assert CONST.PREFIX_FUNCTION_CALL_WRITE
in content, (
104 f
'Expected {CONST.PREFIX_FUNCTION_CALL_WRITE!r} prefix in log, got: {content!r}'