Skip to content

Commit

Permalink
Add check that shp is written in UTF-8 by default on all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
theroggy committed Mar 5, 2024
1 parent 9255602 commit f836bd2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pyogrio/tests/test_raw_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ def test_read_return_only_fids(naturalearth_lowres):
assert len(field_data) == 0


def test_write(tmpdir, naturalearth_lowres):
def test_write_shp(tmpdir, naturalearth_lowres):
meta, _, geometry, field_data = read(naturalearth_lowres)

filename = os.path.join(str(tmpdir), "test.shp")
Expand All @@ -424,6 +424,9 @@ def test_write(tmpdir, naturalearth_lowres):
for ext in (".dbf", ".prj"):
assert os.path.exists(filename.replace(".shp", ext))

# Make sure the file was written in UTF-8
assert read_info(filename)["encoding"] == "UTF-8"


def test_write_gpkg(tmpdir, naturalearth_lowres):
meta, _, geometry, field_data = read(naturalearth_lowres)
Expand Down

0 comments on commit f836bd2

Please sign in to comment.