Skip to content

Commit

Permalink
Allow tests to pass in environments where NO_COLOR=1 is set (#777)
Browse files Browse the repository at this point in the history
Co-authored-by: Michał Górny <mgorny@gentoo.org>
  • Loading branch information
edgarrmondragon and mgorny authored Feb 21, 2024
1 parent ad07cb5 commit ddea973
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import pytest


@pytest.fixture(autouse=True)
def reset_color_envvars(monkeypatch):
"""Remove color-related envvars to fix test output"""
monkeypatch.delenv("FORCE_COLOR", raising=False)
monkeypatch.delenv("NO_COLOR", raising=False)

0 comments on commit ddea973

Please sign in to comment.