Skip to content

Commit 5745199

Browse files
authored
[test] force rendering of ANSI colors for non-tty objects (#12036)
1 parent bea8b6b commit 5745199

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_util/test_util_display.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ def test_status_iterator_length_0(app, status, warning):
3434

3535

3636
@pytest.mark.sphinx('dummy')
37-
def test_status_iterator_verbosity_0(app, status, warning):
37+
def test_status_iterator_verbosity_0(app, status, warning, monkeypatch):
38+
monkeypatch.setenv("FORCE_COLOR", 1)
3839
logging.setup(app, status, warning)
3940

4041
# test for status_iterator (verbosity=0)
@@ -50,7 +51,8 @@ def test_status_iterator_verbosity_0(app, status, warning):
5051

5152

5253
@pytest.mark.sphinx('dummy')
53-
def test_status_iterator_verbosity_1(app, status, warning):
54+
def test_status_iterator_verbosity_1(app, status, warning, monkeypatch):
55+
monkeypatch.setenv("FORCE_COLOR", 1)
5456
logging.setup(app, status, warning)
5557

5658
# test for status_iterator (verbosity=1)

0 commit comments

Comments
 (0)