diff --git a/AUTHORS b/AUTHORS index 347efad57..1ca46e1fa 100644 --- a/AUTHORS +++ b/AUTHORS @@ -346,6 +346,7 @@ Rafal Semik Raquel Alegre Ravi Chandra Reagan Lee +Reilly Brogan Robert Holt Roberto Aldera Roberto Polli diff --git a/changelog/12244.bugfix.rst b/changelog/12244.bugfix.rst new file mode 100644 index 000000000..b348f35e8 --- /dev/null +++ b/changelog/12244.bugfix.rst @@ -0,0 +1 @@ +Fixed a test failure with `test_empty_NO_COLOR_and_FORCE_COLOR_ignored` when `TERM=dumb` diff --git a/testing/io/test_terminalwriter.py b/testing/io/test_terminalwriter.py index afa8d5cae..9f85cee94 100644 --- a/testing/io/test_terminalwriter.py +++ b/testing/io/test_terminalwriter.py @@ -222,6 +222,10 @@ def test_NO_COLOR_and_FORCE_COLOR( assert_color(expected) +@pytest.mark.skipif( + os.environ["TERM"] == "dumb" or "NO_COLOR" in os.environ, + reason="dumb terminals can't handle color", +) def test_empty_NO_COLOR_and_FORCE_COLOR_ignored(monkeypatch: MonkeyPatch) -> None: monkeypatch.setitem(os.environ, "NO_COLOR", "") monkeypatch.setitem(os.environ, "FORCE_COLOR", "")