diff --git a/colorlog/tests/conftest.py b/colorlog/tests/conftest.py index 65fd6d4..52ccec8 100644 --- a/colorlog/tests/conftest.py +++ b/colorlog/tests/conftest.py @@ -28,6 +28,12 @@ def assert_log_message(capsys, log_function, message, *args): return err +@pytest.fixture(autouse=True) +def clean_env(monkeypatch): + monkeypatch.delenv("FORCE_COLOR", raising=False) + monkeypatch.delenv("NO_COLOR", raising=False) + + @pytest.fixture() def reset_loggers(): logging.root.handlers = list()