Use logger in favor over print statment. This is explicitly supported and encuraged by pytest, which also allows for capturing logs separate from stdout calls, which is handy for when e.g. lix code calls out to stdout to keep those differentiated from test output Change-Id: Ib88565a1663da3b77ca6b95f8edf644eafb4a99d
11 lines
462 B
TOML
11 lines
462 B
TOML
[tool.pytest.ini_options]
|
|
addopts = "-p no:xonsh"
|
|
log_cli = true
|
|
log_cli_level = "INFO"
|
|
# how the logs are being printed, default is `"%(filename)s %(lineno)d %(levelname)s %(message)s"`
|
|
# Example log:
|
|
# 2025-05-09T14:06:23Z [ INFO] [test_someting] This is a test message
|
|
# 2025-05-09T14:06:25Z [ ERROR] [test_smt_else] Some error related log
|
|
log_cli_format = "%(asctime)s [%(levelname)8s] [%(name)s] %(message)s"
|
|
log_cli_date_format = "%Y-%m-%dT%H:%M:%SZ"
|