Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TST: update error message in tests for GDAL 3.9 #353

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyogrio/_io.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ cdef void* ogr_open(const char* path_c, int mode, char** options) except NULL:
) from None

except CPLE_BaseError as exc:
if str(exc).endswith("not recognized as a supported file format."):
if str(exc).endswith("a supported file format."):
raise DataSourceError(
f"{str(exc)} It might help to specify the correct driver explicitly by "
"prefixing the file path with '<DRIVER>:', e.g. 'CSV:path'."
Expand Down
2 changes: 1 addition & 1 deletion pyogrio/tests/test_geopandas_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def test_write_read_empty_dataframe_unsupported(tmp_path, ext):

assert filename.exists()
with pytest.raises(
Exception, match=".* not recognized as a supported file format."
Exception, match=".* not recognized as( being in)? a supported file format."
):
_ = read_dataframe(filename)

Expand Down
Loading