def test_tqdm_progress_bar_on(tmp_path, pbar):
    """Test different ways the progress bar can be turned on."""
    trainer = Trainer(default_root_dir=tmp_path, callbacks=pbar)

    progress_bars = [c for c in trainer.callbacks if isinstance(c, ProgressBar)]
    assert len(progress_bars) == 1
    assert progress_bars[0] is trainer.progress_bar_callback
Test different ways the progress bar can be turned on.
tests/tests_pytorch/callbacks/progress/test_tqdm_progress_bar.py