Skip to content

Commit 02a2a40

Browse files
committed
add test
1 parent 1e9996f commit 02a2a40

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/callbacks/test_timer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
from pytorch_lightning.utilities.exceptions import MisconfigurationException
2525
from tests.helpers import BoringModel
2626
from tests.helpers.runif import RunIf
27+
from tests.helpers.utils import no_warning_call
2728

2829

2930
def test_trainer_flag(caplog):
@@ -106,7 +107,9 @@ def test_timer_stops_training(tmpdir, caplog):
106107
timer = Timer(duration=duration)
107108

108109
trainer = Trainer(default_root_dir=tmpdir, max_epochs=1000, callbacks=[timer])
109-
with caplog.at_level(logging.INFO):
110+
with caplog.at_level(logging.INFO), no_warning_call(
111+
DeprecationWarning, match="The signature of `Callback.on_train_epoch_end` has changed in v1.3"
112+
):
110113
trainer.fit(model)
111114
assert trainer.global_step > 1
112115
assert trainer.current_epoch < 999

0 commit comments

Comments
 (0)