From 18f19a170a37f7403e9ce09c0847077757850bfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gina=20H=C3=A4u=C3=9Fge?= Date: Mon, 7 Feb 2022 15:06:16 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=9A=20Fix=20test=20var=20&=20expected?= =?UTF-8?q?=20output?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/octoprint/util/commandline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/octoprint/util/commandline.py b/src/octoprint/util/commandline.py index 81110e80a..76d35f72e 100644 --- a/src/octoprint/util/commandline.py +++ b/src/octoprint/util/commandline.py @@ -60,9 +60,9 @@ def clean_ansi(line): >>> text = "We \x1b[?25lhide the cursor here and then \x1b[?25hshow it again here in unicode" >>> clean_ansi(text) # doctest: +ALLOW_BYTES 'We hide the cursor here and then show it again here in unicode' - >>> test = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 1.1 MB/s eta 0:00:00" + >>> text = "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 1.1 MB/s eta 0:00:00" >>> clean_ansi(text) # doctest: +ALLOW_BYTES - '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 1.1 MB/s eta 0:00:00' + '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.5/6.5 MB 1.1 MB/s eta 0:00:00' """ if isinstance(line, unicode): return _ANSI_REGEX["unicode"].sub("", line)