[Bug 2004553] [NEW] django-rich FTBFS when TERM=unknown

Launchpad Bug Tracker 2004553 at bugs.launchpad.net
Fri Feb 3 09:34:38 UTC 2023


You have been subscribed to a public bug by Olivier Gayot (ogayot):

django-rich FTBFS on Ubuntu because the build-time test suite fails:


___________________ RichCommandTests.test_output_force_color ___________________

self = <tests.test_management.RichCommandTests
testMethod=test_output_force_color>

    def test_output_force_color(self):
        stdout = StringIO()
    
        call_command("example", "--force-color", stdout=stdout)
    
>       assert stdout.getvalue() == "\x1b[1;31mAlert!\x1b[0m\n"
E       AssertionError: assert 'Alert!\n' == '\x1b[1;31mAlert!\x1b[0m\n'
E         - Alert!
E         + Alert!

This happens because the underlying python rich library disables
color/style when the TERM variable is set to unknown (which is what the
Ubuntu builders have):

> Setting the environment variable TERM to "dumb" or "unknown" will
disable color/style and some features that require moving the cursor,
such as progress bars.

https://rich.readthedocs.io/en/stable/console.html?highlight=unknown#environment-
variables

** Affects: django-rich (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: django-rich (Debian)
     Importance: Unknown
         Status: Unknown

-- 
django-rich FTBFS when TERM=unknown 
https://bugs.launchpad.net/bugs/2004553
You received this bug notification because you are a member of Ubuntu Sponsors Team, which is subscribed to the bug report.



More information about the Ubuntu-sponsors mailing list