diff --git a/usr/lib/python3/dist-packages/unicode_show/tests/unicode_show.py b/usr/lib/python3/dist-packages/unicode_show/tests/unicode_show.py index dff4ff3e..911aacce 100644 --- a/usr/lib/python3/dist-packages/unicode_show/tests/unicode_show.py +++ b/usr/lib/python3/dist-packages/unicode_show/tests/unicode_show.py @@ -480,7 +480,7 @@ def test_pty_color(self) -> None: self._test_stdin_pty( main_func=unicode_show_main, argv0=self.argv0, - stdout_string=expect_string_color, + stdout_string=expect_string_nocolor, exit_code=1, args=[], stdin_string=test_string, diff --git a/usr/lib/python3/dist-packages/unicode_show/unicode_show.py b/usr/lib/python3/dist-packages/unicode_show/unicode_show.py index 6a5c01a3..671586f9 100644 --- a/usr/lib/python3/dist-packages/unicode_show/unicode_show.py +++ b/usr/lib/python3/dist-packages/unicode_show/unicode_show.py @@ -174,7 +174,7 @@ def main() -> int: global USE_COLOR USE_COLOR = ( not os.getenv("NOCOLOR") - and os.getenv("NO_COLOR") != "1" + and os.getenv("NO_COLOR") is None and os.getenv("TERM") != "dumb" and sys.stdout.isatty() )