Skip to content

Commit 627e510

Browse files
committed
add fix on tests
1 parent f2b7bd8 commit 627e510

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

pandas/tests/io/test_fsspec.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def test_s3_parquet(s3_public_bucket, s3so, df1):
282282

283283
@td.skip_if_installed("fsspec")
284284
def test_not_present_exception():
285-
msg = "Missing optional dependency 'fsspec'|fsspec library is required"
285+
msg = "`Import fsspec` failed. Use pip or conda to install the fsspec package."
286286
with pytest.raises(ImportError, match=msg):
287287
read_csv("memory://test/test.csv")
288288

pandas/tests/io/test_parquet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ def test_get_engine_auto_error_message():
325325
with pytest.raises(ImportError, match=match):
326326
get_engine("auto")
327327
else:
328-
match = "Missing optional dependency .pyarrow."
328+
match = "Import .pyarrow failed."
329329
with pytest.raises(ImportError, match=match):
330330
get_engine("auto")
331331

pandas/tests/test_optional_dependency.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def test_import_optional():
15-
match = "Missing .*notapackage.* pip .* conda .* notapackage"
15+
match = "Import .*notapackage.* pip .* conda .* notapackage"
1616
with pytest.raises(ImportError, match=match) as exc_info:
1717
import_optional_dependency("notapackage")
1818
# The original exception should be there as context:

pandas/tests/util/test_numba.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77

88
@td.skip_if_installed("numba")
99
def test_numba_not_installed_option_context():
10-
with pytest.raises(ImportError, match="Missing optional"):
10+
with pytest.raises(ImportError, match="Import numba failed"):
1111
with option_context("compute.use_numba", True):
1212
pass

0 commit comments

Comments
 (0)