Skip to content

Commit

Permalink
Merge pull request #11226 from rouault/gnm_fix_mingw64
Browse files Browse the repository at this point in the history
autotest: fix test failure with msys2 mingw64
  • Loading branch information
rouault authored Nov 9, 2024
2 parents efb6229 + bb64609 commit 253e480
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions autotest/gnm/gnm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_gnm_filenetwork_create():
pass

drv = gdal.GetDriverByName("GNMFile")
ds = drv.Create(
with drv.Create(
"tmp/",
0,
0,
Expand All @@ -47,17 +47,15 @@ def test_gnm_filenetwork_create():
"net_description=Test file based GNM",
"net_srs=EPSG:4326",
],
)
# cast to GNM
dn = gnm.CastToNetwork(ds)
assert dn is not None
assert dn.GetVersion() == 100, "GNM: Check GNM version failed"
assert dn.GetName() == "test_gnm", "GNM: Check GNM name failed"
assert (
dn.GetDescription() == "Test file based GNM"
), "GNM: Check GNM description failed"

dn = None
) as ds:
# cast to GNM
dn = gnm.CastToNetwork(ds)
assert dn is not None
assert dn.GetVersion() == 100, "GNM: Check GNM version failed"
assert dn.GetName() == "test_gnm", "GNM: Check GNM name failed"
assert (
dn.GetDescription() == "Test file based GNM"
), "GNM: Check GNM description failed"


###############################################################################
Expand Down

0 comments on commit 253e480

Please sign in to comment.