Skip to content

Commit c8def3a

Browse files
committed
test: remove redundant test for RichProgressBar when rich is not available
1 parent 95d1898 commit c8def3a

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

tests/tests_pytorch/trainer/connectors/test_rich_integration.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,6 @@ def test_no_rich_respects_user_provided_tqdm_progress_bar(self, tmp_path):
4040
assert user_progress_bar in trainer.callbacks
4141
assert sum(isinstance(cb, ProgressBar) for cb in trainer.callbacks) == 1
4242

43-
@patch("lightning.pytorch.trainer.connectors.callback_connector._RICH_AVAILABLE", False)
44-
def test_no_rich_respects_user_provided_rich_progress_bar(self, tmp_path):
45-
# If user explicitly provides RichProgressBar, it should be used,
46-
# even if _RICH_AVAILABLE is False (simulating our connector logic).
47-
# RequirementCache would normally prevent RichProgressBar instantiation if rich is truly not installed.
48-
user_progress_bar = RichProgressBar()
49-
trainer = Trainer(
50-
default_root_dir=tmp_path, callbacks=[user_progress_bar], logger=False, enable_checkpointing=False
51-
)
52-
assert user_progress_bar in trainer.callbacks
53-
assert sum(isinstance(cb, ProgressBar) for cb in trainer.callbacks) == 1
54-
assert isinstance(trainer.progress_bar_callback, RichProgressBar)
55-
5643
@patch("lightning.pytorch.trainer.connectors.callback_connector._RICH_AVAILABLE", False)
5744
def test_no_rich_respects_user_provided_model_summary(self, tmp_path):
5845
user_model_summary = ModelSummary()

0 commit comments

Comments
 (0)