[Bug 2004553] Re: django-rich FTBFS when TERM=unknown
Simon Quigley
2004553 at bugs.launchpad.net
Sun Feb 5 02:24:58 UTC 2023
Looks good to me, uploaded. Don't forget to submit your updated patch to
Debian.
Thank you!
** Changed in: django-rich (Ubuntu)
Status: New => Fix Committed
--
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:
Fix Committed
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