Refs #26432 -- Skipped a raster test as needed.
This commit is contained in:
parent
6c9603277d
commit
a3265af808
|
@ -320,12 +320,13 @@ class GDALBandTests(SimpleTestCase):
|
||||||
self.assertEqual(self.band.datatype(), 1)
|
self.assertEqual(self.band.datatype(), 1)
|
||||||
self.assertEqual(self.band.datatype(as_string=True), 'GDT_Byte')
|
self.assertEqual(self.band.datatype(as_string=True), 'GDT_Byte')
|
||||||
self.assertEqual(self.band.nodata_value, 15)
|
self.assertEqual(self.band.nodata_value, 15)
|
||||||
data = self.band.data()
|
if numpy:
|
||||||
assert_array = numpy.loadtxt(
|
data = self.band.data()
|
||||||
os.path.join(os.path.dirname(upath(__file__)), '../data/rasters/raster.numpy.txt')
|
assert_array = numpy.loadtxt(
|
||||||
)
|
os.path.join(os.path.dirname(upath(__file__)), '../data/rasters/raster.numpy.txt')
|
||||||
numpy.testing.assert_equal(data, assert_array)
|
)
|
||||||
self.assertEqual(data.shape, (self.band.height, self.band.width))
|
numpy.testing.assert_equal(data, assert_array)
|
||||||
|
self.assertEqual(data.shape, (self.band.height, self.band.width))
|
||||||
try:
|
try:
|
||||||
smin, smax, smean, sstd = self.band.statistics(approximate=True)
|
smin, smax, smean, sstd = self.band.statistics(approximate=True)
|
||||||
self.assertEqual(smin, 0)
|
self.assertEqual(smin, 0)
|
||||||
|
|
Loading…
Reference in New Issue