Skip to content

Commit

Permalink
[test] force rendering of ANSI colors for non-tty objects (#12036)
Browse files Browse the repository at this point in the history
  • Loading branch information
nedbat committed Mar 2, 2024
1 parent bea8b6b commit 5745199
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_util/test_util_display.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ def test_status_iterator_length_0(app, status, warning):


@pytest.mark.sphinx('dummy')
def test_status_iterator_verbosity_0(app, status, warning):
def test_status_iterator_verbosity_0(app, status, warning, monkeypatch):
monkeypatch.setenv("FORCE_COLOR", 1)
logging.setup(app, status, warning)

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


@pytest.mark.sphinx('dummy')
def test_status_iterator_verbosity_1(app, status, warning):
def test_status_iterator_verbosity_1(app, status, warning, monkeypatch):
monkeypatch.setenv("FORCE_COLOR", 1)
logging.setup(app, status, warning)

# test for status_iterator (verbosity=1)
Expand Down

0 comments on commit 5745199

Please sign in to comment.