replace log_info_mock with pytest's caplog

This commit is contained in:
Anthony Sottile 2024-09-30 19:58:16 -04:00
parent e7cfc0d2cb
commit 1d2f1c0cce
3 changed files with 8 additions and 15 deletions

View file

@ -2,7 +2,6 @@ from __future__ import annotations
import functools
import io
import logging
import os.path
from unittest import mock
@ -203,12 +202,6 @@ def store(tempdir_factory):
yield Store(os.path.join(tempdir_factory.get(), '.pre-commit'))
@pytest.fixture
def log_info_mock():
with mock.patch.object(logging.getLogger('pre_commit'), 'info') as mck:
yield mck
class Fixture:
def __init__(self, stream: io.BytesIO) -> None:
self._stream = stream