Skip to content
Prev Previous commit
Next Next commit
add fix on tests
  • Loading branch information
KevsterAmp committed Jun 7, 2025
commit 627e510705cb9b07afbaa53888b43b70788eb939
2 changes: 1 addition & 1 deletion pandas/tests/io/test_fsspec.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ def test_s3_parquet(s3_public_bucket, s3so, df1):

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

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/io/test_parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ def test_get_engine_auto_error_message():
with pytest.raises(ImportError, match=match):
get_engine("auto")
else:
match = "Missing optional dependency .pyarrow."
match = "Import .pyarrow failed."
with pytest.raises(ImportError, match=match):
get_engine("auto")

Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/test_optional_dependency.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


def test_import_optional():
match = "Missing .*notapackage.* pip .* conda .* notapackage"
match = "Import .*notapackage.* pip .* conda .* notapackage"
with pytest.raises(ImportError, match=match) as exc_info:
import_optional_dependency("notapackage")
# The original exception should be there as context:
Expand Down
2 changes: 1 addition & 1 deletion pandas/tests/util/test_numba.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

@td.skip_if_installed("numba")
def test_numba_not_installed_option_context():
with pytest.raises(ImportError, match="Missing optional"):
with pytest.raises(ImportError, match="Import numba failed"):
with option_context("compute.use_numba", True):
pass
Loading