Skip to content

Commit 93b6f8d

Browse files
committed
fix: catch ImportError in get_progress_bar and remove matplotlib skip in tests
1 parent 73e7c77 commit 93b6f8d

2 files changed

Lines changed: 1 addition & 2 deletions

File tree

packages/google-cloud-bigquery/google/cloud/bigquery/_tqdm_helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def get_progress_bar(progress_bar_type, description, total, unit):
7070
)
7171
elif progress_bar_type == "tqdm_gui":
7272
return tqdm.tqdm_gui(desc=description, total=total, unit=unit)
73-
except (KeyError, TypeError): # pragma: NO COVER
73+
except (KeyError, TypeError, ImportError): # pragma: NO COVER
7474
# Protect ourselves from any tqdm errors. In case of
7575
# unexpected tqdm behavior, just fall back to showing
7676
# no progress bar.

packages/google-cloud-bigquery/tests/unit/test_table.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4092,7 +4092,6 @@ def test_to_dataframe_no_tqdm(self):
40924092

40934093
def test_to_dataframe_tqdm_error(self):
40944094
pytest.importorskip("pandas")
4095-
pytest.importorskip("matplotlib")
40964095
tqdm = pytest.importorskip("tqdm")
40974096
mock.patch("tqdm.tqdm_gui", new=None)
40984097
mock.patch("tqdm.notebook.tqdm", new=None)

0 commit comments

Comments
 (0)