question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

A line break after Pytest's logs on console

See original GitHub issue

What’s the problem this feature will solve?

Improving readability of console messages. Currently the Pytest’s messages are followed by application log messages on the same line. For example:

[INFO] ...
[INFO] ...
PASSED[INFO]...
[INFO] ...

I think it would be beneficial to add a line break after Pytest’s console logs.

Describe the solution you’d like

Alternative Solutions

Additional context

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
cbensimoncommented, Nov 9, 2022

Would have been great if something could be done Running pytest -v produces this on most of the projects

0reactions
thischcommented, Apr 29, 2021

@ValaJeyhani FYI in your example in https://github.com/pytest-dev/pytest/issues/8574#issuecomment-828750810 you don’t need a conftest.py file, because you can specify the logging options (log_date_format, log_format and log_level) in pytest.ini.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Logging within pytest tests - python - Stack Overflow
Since version 3.3, pytest supports live logging, meaning that all the log records emitted in tests will be printed to the terminal ...
Read more >
How to manage logging — pytest documentation
pytest captures log messages of level WARNING or above automatically and displays them in their own section for each failed test in the...
Read more >
pytest Documentation - Read the Docs
Run the following command in your command line: ... The log levels set are restored automatically at the end of the test.
Read more >
Welcome to Pytest-BDD's documentation! - Read the Docs
Functions decorated with the scenario decorator behave like a normal test function, and they will be executed after all scenario steps. from pytest_bdd...
Read more >
Better pytest failure summaries - Qxf2 BLOG
addHandler(streamHandler) log.error('Hello from log: You should not see me in the pytest summary') #write into a log print 'Hello from ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found