Skip to content

Commit bd382bd

Browse files
committed
claymore!!!
1 parent 92eb485 commit bd382bd

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

tests/tests_pytorch/callbacks/progress/test_tqdm_progress_bar.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,9 @@ def predict_step(self, *args, **kwargs):
480480
return super().predict_step(*args, **kwargs)
481481

482482

483-
@mock.patch("tqdm.tqdm.write")
484-
def test_tqdm_progress_bar_print(tqdm_write, tmp_path):
483+
@mock.patch("builtins.print")
484+
@mock.patch("lightning.pytorch.callbacks.progress.tqdm_progress.Tqdm.write")
485+
def test_tqdm_progress_bar_print(tqdm_write, mock_print, tmp_path):
485486
"""Test that printing in the LightningModule redirects arguments to the progress bar."""
486487
model = PrintModel()
487488
bar = TQDMProgressBar()
@@ -506,8 +507,9 @@ def test_tqdm_progress_bar_print(tqdm_write, tmp_path):
506507
]
507508

508509

509-
@mock.patch("tqdm.tqdm.write")
510-
def test_tqdm_progress_bar_print_no_train(tqdm_write, tmp_path):
510+
@mock.patch("builtins.print")
511+
@mock.patch("lightning.pytorch.callbacks.progress.tqdm_progress.Tqdm.write")
512+
def test_tqdm_progress_bar_print_no_train(tqdm_write, mock_print, tmp_path):
511513
"""Test that printing in the LightningModule redirects arguments to the progress bar without training."""
512514
model = PrintModel()
513515
bar = TQDMProgressBar()

0 commit comments

Comments
 (0)