Skip to content

Commit ddea973

Browse files
Allow tests to pass in environments where NO_COLOR=1 is set (#777)
Co-authored-by: Michał Górny <[email protected]>
1 parent ad07cb5 commit ddea973

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/conftest.py

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import pytest
2+
3+
4+
@pytest.fixture(autouse=True)
5+
def reset_color_envvars(monkeypatch):
6+
"""Remove color-related envvars to fix test output"""
7+
monkeypatch.delenv("FORCE_COLOR", raising=False)
8+
monkeypatch.delenv("NO_COLOR", raising=False)

0 commit comments

Comments
 (0)