-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84dd3e0
commit 760a0e7
Showing
2 changed files
with
22 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import logging | ||
import pytest | ||
|
||
# Log Pytest Output | ||
@pytest.fixture(scope="session", autouse=True) | ||
def setup_logging(request): | ||
|
||
logging.basicConfig(level=logging.INFO) | ||
logger = logging.getLogger('potholeClassifierLogger') | ||
|
||
def pytest_runtest_logreport(report): | ||
if report.when == "call": | ||
logger.info(report.nodeid + ": " + report.outcome.upper()) | ||
for line in report.caplog: | ||
logger.info(line) | ||
|
||
def teardown_logging(): | ||
logging.shutdown() | ||
|
||
request.addfinalizer(teardown_logging) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters