def test_property_logger(tmp_path):
    """Test that the logger in LightningModule is accessible via the Trainer."""
    model = BoringModel()
    assert model.logger is None

    logger = TensorBoardLogger(tmp_path)
    trainer = Trainer(logger=logger)
    model.trainer = trainer
    assert model.logger == logger
Test that the logger in LightningModule is accessible via the Trainer.
tests/tests_pytorch/core/test_lightning_module.py