def test_training_step_with_dataloader_iter(tmp_path) -> None:
    """A baseline functional test for `training_step` with dataloader access."""
    trainer = Trainer(max_epochs=1, default_root_dir=tmp_path, accelerator="cpu")
    m = AsyncBoringModel()
    trainer.fit(m)
    assert m.num_batches_processed == DATASET_LEN, f"Expect all {DATASET_LEN} batches to be processed."
A baseline functional test for `training_step` with dataloader access.
tests/tests_pytorch/loops/test_fetchers.py