def test_if_test_works_with_checkpoint_false(tmp_path):
    """Ensure that model trains properly when `enable_checkpointing` is set to False."""
    # Train a model on TPU
    model = BoringModel()
    trainer = Trainer(
        max_epochs=1,
        accelerator="tpu",
        devices="auto",
        default_root_dir=tmp_path,
        fast_dev_run=True,
        enable_checkpointing=False,
    )
    trainer.fit(model)
    assert trainer.state.finished, f"Training failed with {trainer.state}"
Ensure that model trains properly when `enable_checkpointing` is set to False.
tests/tests_pytorch/models/test_tpu.py