[Bug 2004553] Re: django-rich FTBFS when TERM=unknown
Olivier Gayot
2004553 at bugs.launchpad.net
Thu Feb 2 12:04:29 UTC 2023
** Bug watch added: Debian Bug tracker #1030305
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030305
** Also affects: django-rich (Debian) via
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030305
Importance: Unknown
Status: Unknown
** Patch added: "1-1.4.0-5__1.4.0-5ubuntu1.debdiff"
https://bugs.launchpad.net/debian/+source/django-rich/+bug/2004553/+attachment/5644442/+files/1-1.4.0-5__1.4.0-5ubuntu1.debdiff
** Changed in: django-rich (Ubuntu)
Status: In Progress => New
** Changed in: django-rich (Ubuntu)
Assignee: Olivier Gayot (ogayot) => (unassigned)
--
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