def test_property_current_epoch():
    """Test that the current_epoch in LightningModule is accessible via the Trainer."""
    model = BoringModel()
    assert model.current_epoch == 0

    trainer = Mock(current_epoch=123)
    model.trainer = trainer
    assert model.current_epoch == 123
Test that the current_epoch in LightningModule is accessible via the Trainer.
tests/tests_pytorch/core/test_lightning_module.py