Skip to content
Closed
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
10 changes: 10 additions & 0 deletions python/grass/pygrass/raster/testsuite/test_raster_region.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from grass.gunittest.case import TestCase
from grass.gunittest.main import test
from grass.gunittest.utils import xfail_windows

from grass.pygrass.raster import RasterRow
from grass.pygrass.raster import raster2numpy
Expand All @@ -26,6 +27,13 @@ def tearDownClass(cls):
cls.runModule("g.remove", flags="f", type="raster", name=cls.name)
cls.del_temp_region()

# Windows-only: the small region set below isn't actually restricting
# what RasterRow reads back (rast[0] comes back with ~100000 elements
# instead of 10). Confirmed this is specific to Windows: passes reliably
# on Linux both in isolation and as part of the full testsuite run (so
# it isn't a state leak from an earlier test file either). Needs
# investigation with actual Windows access; remove once fixed.
@xfail_windows
def test_resampling_1(self):
region = Region()

Expand All @@ -47,6 +55,7 @@ def test_resampling_1(self):
rast[5].tolist(), [23, 23, 23, 23, 23, 33, 33, 33, 33, 33]
)

@xfail_windows # same Windows-only issue as test_resampling_1
def test_resampling_2(self):
region = Region()

Expand All @@ -73,6 +82,7 @@ def test_resampling_2(self):
self.assertCountEqual(rast[2].tolist()[2:6], [11.0, 21.0, 31.0, 41.0])
self.assertCountEqual(rast[5].tolist()[2:6], [14.0, 24.0, 34.0, 44.0])

@xfail_windows # same Windows-only issue as test_resampling_1
def test_resampling_to_numpy(self):
region = Region()
region.ewres = 0.1
Expand Down
Loading