-
logging.basicConfig(level=loglevel,
format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s',
datefmt='[%Y-%m-%d %H:%M:%S]' )
run command:
log_format='%(asctime)s %(filename)s[line:%(lineno)d] %(levelname)s %(message)s'
log_date_format='[%Y-%m-%d %H:%M:%S]'
args = ["--log-level", "info", "--log-format", log_format, "--log-date-format", log_date_format,
"--tb", "short", "--capture", "no", "--alluredir", REPORT_DIR, API_TEST_CASE_DIR]
test_result = pytest.main(args) |
Beta Was this translation helpful? Give feedback.
Answered by
Zac-HD
Aug 10, 2020
Replies: 2 comments
-
Looks like a problem with ANSI escape codes for colored output. Related links: https://en.wikipedia.org/wiki/ANSI_escape_code , https://no-color.org/ , https://docs.pytest.org/en/stable/reference.html#envvar-PY_COLORS |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
nicoddemus
-
@Zac-HD, I've moved a few questions which have been closed recently by you (thanks again for that!), which have a clear answer, to a Discussion; I think this is a good approach we can take when closing old questions. 👍 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Looks like a problem with ANSI escape codes for colored output.
Related links: https://en.wikipedia.org/wiki/ANSI_escape_code , https://no-color.org/ , https://docs.pytest.org/en/stable/reference.html#envvar-PY_COLORS