replace fake_log_handler with caplog

This commit is contained in:
Anthony Sottile 2021-01-22 14:02:45 -08:00
parent bb50e00447
commit c7cbb1e6ad
2 changed files with 8 additions and 16 deletions

View file

@ -261,15 +261,6 @@ def cap_out():
yield Fixture(stream)
@pytest.fixture
def fake_log_handler():
handler = mock.Mock(level=logging.INFO)
logger = logging.getLogger('pre_commit')
logger.addHandler(handler)
yield handler
logger.removeHandler(handler)
@pytest.fixture(scope='session', autouse=True)
def set_git_templatedir(tmpdir_factory):
tdir = str(tmpdir_factory.mktemp('git_template_dir'))