def test_no_depre_without_epoch_end(tmp_path):
    """Tests that only training_step can be used."""
    model = TestModel()

    trainer = Trainer(
        default_root_dir=tmp_path,
        limit_train_batches=2,
        limit_val_batches=2,
        max_epochs=2,
        log_every_n_steps=1,
        enable_model_summary=False,
    )

    with warnings.catch_warnings(record=True) as w:
        trainer.fit(model)

        for msg in w:
            assert "should not return anything " not in str(msg)
Tests that only training_step can be used.
tests/tests_pytorch/loops/test_flow_warnings.py