Skip to content
This repository was archived by the owner on Jul 8, 2023. It is now read-only.

Commit 57788b5

Browse files
committed
Display logs in failed tests (useful for debugging)
1 parent 64df3fe commit 57788b5

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: project/conftest.py

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import pytest
2+
from utils.logger import set_up_logging
3+
4+
5+
@pytest.fixture(scope="session", autouse=True)
6+
def do_something(request):
7+
set_up_logging(save_to_file=False)

Diff for: pytest.ini

+2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
[pytest]
22
python_files = test_*.py
3+
log_format = %(asctime)s %(levelname)s %(message)s
4+
log_date_format = .

0 commit comments

Comments
 (0)