From a3265af808bdf8fb466545a64608ff42de30f40d Mon Sep 17 00:00:00 2001 From: Tim Graham Date: Sat, 16 Apr 2016 16:24:32 -0400 Subject: [PATCH] Refs #26432 -- Skipped a raster test as needed. --- tests/gis_tests/gdal_tests/test_raster.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/tests/gis_tests/gdal_tests/test_raster.py b/tests/gis_tests/gdal_tests/test_raster.py index 834e3f6048..8a0aa09b00 100644 --- a/tests/gis_tests/gdal_tests/test_raster.py +++ b/tests/gis_tests/gdal_tests/test_raster.py @@ -320,12 +320,13 @@ class GDALBandTests(SimpleTestCase): self.assertEqual(self.band.datatype(), 1) self.assertEqual(self.band.datatype(as_string=True), 'GDT_Byte') self.assertEqual(self.band.nodata_value, 15) - data = self.band.data() - 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)) + if numpy: + data = self.band.data() + 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)) try: smin, smax, smean, sstd = self.band.statistics(approximate=True) self.assertEqual(smin, 0)