Skip to content

Commit

Permalink
TST: update error message in tests for GDAL 3.9 (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored Jan 27, 2024
1 parent e6e6e42 commit 84195b4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
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

0 comments on commit 84195b4

Please sign in to comment.