Skip to content

Commit 97f77fc

Browse files
ashleveawaelchli
andauthored
Update tests/checkpointing/test_model_checkpoint.py
Co-authored-by: Adrian Wälchli <[email protected]>
1 parent 80ce9d6 commit 97f77fc

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/checkpointing/test_model_checkpoint.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -689,10 +689,7 @@ def test_model_checkpoint_save_last_warning(tmpdir, caplog, max_epochs, should_v
689689
)
690690
with caplog.at_level(logging.INFO):
691691
trainer.fit(model)
692-
if verbose and save_last:
693-
assert caplog.messages.count('Saving latest checkpoint...') == 1
694-
else:
695-
assert caplog.messages.count('Saving latest checkpoint...') == 0
692+
assert caplog.messages.count('Saving latest checkpoint...') == (verbose and save_last)
696693

697694

698695
def test_model_checkpoint_save_last_checkpoint_contents(tmpdir):

0 commit comments

Comments
 (0)