diff --git a/tests/test_utils_tqdm_mod.py b/tests/test_utils_tqdm_mod.py index 058e8539..48eb208a 100644 --- a/tests/test_utils_tqdm_mod.py +++ b/tests/test_utils_tqdm_mod.py @@ -19,7 +19,7 @@ def extract_last_line(output): def test_complete_progress_bar(): f = io.StringIO() with redirect_stdout(f): - for _ in tqdm_mod(range(3), desc="TestBar"): + for _ in tqdm_mod(range(3), desc="TestBar", file=f, dynamic_ncols=False): sleep(0.001) last_line = extract_last_line(f.getvalue()) assert last_line == "TestBar: 100%|########################| 3.00/3.00 [00:00<00:00, 3.0 Hz]" @@ -27,7 +27,7 @@ def test_complete_progress_bar(): def test_set_progress_multiple_points(): f = io.StringIO() with redirect_stdout(f): - bar = tqdm_mod(total=5, desc="SetBar") + bar = tqdm_mod(total=5, desc="SetBar", file=f, dynamic_ncols=False) bar.set(1.0) bar.set(2.0) bar.set(3.5) @@ -45,7 +45,7 @@ def test_set_progress_multiple_points(): def test_custom_unit(): f = io.StringIO() with redirect_stdout(f): - for _ in tqdm_mod(range(4), desc="StepBar", unit="step"): + for _ in tqdm_mod(range(4), desc="StepBar", unit="step", file=f, dynamic_ncols=False): sleep(0.001) last_line = extract_last_line(f.getvalue()) assert last_line == "StepBar: 100%|########################| 4.00/4.00 [00:00<00:00, 4.0step/s]" @@ -53,7 +53,7 @@ def test_custom_unit(): def test_clamp_above_total(): f = io.StringIO() with redirect_stdout(f): - bar = tqdm_mod(total=10, desc="ClampBar") + bar = tqdm_mod(total=10, desc="ClampBar", file=f, dynamic_ncols=False) bar.set(12) # Clamp to 10 bar.close() last_line = extract_last_line(f.getvalue())