[Bug 2004553] Re: django-rich FTBFS when TERM=unknown
Olivier Gayot
2004553 at bugs.launchpad.net
Thu Feb 2 12:08:24 UTC 2023
Green build on PPA: https://launchpad.net/~ogayot/+archive/ubuntu/lunar-
proposed/+build/25542391
--
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/2004553
Title:
django-rich FTBFS when TERM=unknown
Status in django-rich package in Ubuntu:
New
Status in django-rich package in Debian:
Unknown
Bug description:
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 - [1;31mAlert![0m
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
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/django-rich/+bug/2004553/+subscriptions
More information about the Ubuntu-sponsors
mailing list