From 53c62fecfb4363ad0501065e5a4178ed8aab64aa Mon Sep 17 00:00:00 2001 From: tligui_y Date: Wed, 30 Jul 2025 16:10:22 +0200 Subject: [PATCH] Update tests/test_utils_tqdm_mod.py --- tests/test_utils_tqdm_mod.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/test_utils_tqdm_mod.py b/tests/test_utils_tqdm_mod.py index cc4b11901..809905fa0 100644 --- a/tests/test_utils_tqdm_mod.py +++ b/tests/test_utils_tqdm_mod.py @@ -118,8 +118,15 @@ def test_float_alignment_in_bar(): assert expected in values, f"Missing expected value: {expected}" # Check that all values are visually aligned, output with same length, to ensure that format_sizeof add the good number avec spaces - lengths = [len(v) for v in values] - assert len(set(lengths)) == 1, f"Misaligned values: {values}" + + bar_segments = [] + for line in lines: + match = re.search(r".*?\]", line) + if match: + bar_segments.append(match.group(0)) + + lengths = [len(seg) for seg in bar_segments] + assert len(set(lengths)) == 1 def test_custom_unit():