Refs #30489 -- Fixed RasterFieldTest.test_deserialize_with_pixeltype_flags() when run without numpy.

This commit is contained in:
Mariusz Felisiak 2020-03-07 21:34:33 +01:00
parent a3917c323f
commit 9358da704e
1 changed files with 4 additions and 1 deletions

View File

@ -68,7 +68,10 @@ class RasterFieldTest(TransactionTestCase):
rast=Func(F('rast'), function='ST_SetBandIsNoData'),
)
r.refresh_from_db()
self.assertEqual(r.rast.bands[0].data(), [[no_data]])
band = r.rast.bands[0].data()
if numpy:
band = band.flatten().tolist()
self.assertEqual(band, [no_data])
self.assertEqual(r.rast.bands[0].nodata_value, no_data)
def test_model_creation(self):