mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
test: use caplog.at_level() to restore log level after test
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
dd8598e53e
commit
277b9e566c
+4
-3
@@ -3,12 +3,13 @@ from git import Repo
|
||||
from git.exc import GitCommandNotFound
|
||||
|
||||
from dvc.repo import Repo as DvcRepo
|
||||
from .basic_env import TestDirFixture, logger
|
||||
from .basic_env import TestDirFixture
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def debug():
|
||||
logger.setLevel("DEBUG")
|
||||
def debug(caplog):
|
||||
with caplog.at_level("DEBUG", logger="dvc"):
|
||||
yield
|
||||
|
||||
|
||||
# Wrap class like fixture as pytest-like one to avoid code duplication
|
||||
|
||||
Reference in New Issue
Block a user