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():