def test_dataloaders_passed_to_fit(tmp_path):
    """Test if dataloaders passed to trainer works on TPU."""
    model = BoringModel()

    trainer = Trainer(default_root_dir=tmp_path, max_epochs=1, accelerator="tpu", devices="auto")
    trainer.fit(model, train_dataloaders=model.train_dataloader(), val_dataloaders=model.val_dataloader())
Test if dataloaders passed to trainer works on TPU.
tests/tests_pytorch/models/test_tpu.py