Skip to content

Commit d826f97

Browse files
committed
Update test_remove_1-5.py
1 parent 78b2562 commit d826f97

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/deprecated_api/test_remove_1-5.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import pytest
1919

2020
from pytorch_lightning import Callback, Trainer
21+
from pytorch_lightning.callbacks import ModelCheckpoint
2122
from pytorch_lightning.loggers import WandbLogger
2223
from tests.helpers import BoringModel
2324
from tests.helpers.utils import no_warning_call
@@ -68,3 +69,9 @@ def on_save_checkpoint(self, *args):
6869
trainer.callbacks = [NewSignature(), ValidSignature1(), ValidSignature2()]
6970
with no_warning_call(DeprecationWarning):
7071
trainer.save_checkpoint(filepath)
72+
73+
def test_v1_5_0_model_checkpoint_period(tmpdir):
74+
with no_warning_call(DeprecationWarning):
75+
ModelCheckpoint(dirpath=tmpdir)
76+
with pytest.deprecated_call(match="is deprecated in v1.3 and will be removed in v1.5"):
77+
ModelCheckpoint(dirpath=tmpdir, period=1)

0 commit comments

Comments
 (0)