mirror of
https://github.com/Textualize/rich.git
synced 2025-07-12 07:05:00 +00:00

Ensure to unset FORCE_COLOR and NO_COLOR environment variables within the scope of individual tests, in order to fix test failures when these variables are set in the environment where tests are run, e.g. via: NO_COLOR=1 tox
8 lines
245 B
Python
8 lines
245 B
Python
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)
|