Removed a test workaround for some old GDAL 1.7.x versions.
This commit is contained in:
parent
81cdcb66bc
commit
9f66302797
|
@ -108,17 +108,11 @@ class DataSourceTest(unittest.TestCase):
|
||||||
self.assertEqual(source.nfld, len(layer.fields))
|
self.assertEqual(source.nfld, len(layer.fields))
|
||||||
|
|
||||||
# Testing the layer's extent (an Envelope), and its properties
|
# Testing the layer's extent (an Envelope), and its properties
|
||||||
if source.driver == 'VRT' and (GDAL_VERSION >= (1, 7, 0) and GDAL_VERSION < (1, 7, 3)):
|
self.assertIsInstance(layer.extent, Envelope)
|
||||||
# There's a known GDAL regression with retrieving the extent
|
self.assertAlmostEqual(source.extent[0], layer.extent.min_x, 5)
|
||||||
# of a VRT layer in versions 1.7.0-1.7.2:
|
self.assertAlmostEqual(source.extent[1], layer.extent.min_y, 5)
|
||||||
# http://trac.osgeo.org/gdal/ticket/3783
|
self.assertAlmostEqual(source.extent[2], layer.extent.max_x, 5)
|
||||||
pass
|
self.assertAlmostEqual(source.extent[3], layer.extent.max_y, 5)
|
||||||
else:
|
|
||||||
self.assertIsInstance(layer.extent, Envelope)
|
|
||||||
self.assertAlmostEqual(source.extent[0], layer.extent.min_x, 5)
|
|
||||||
self.assertAlmostEqual(source.extent[1], layer.extent.min_y, 5)
|
|
||||||
self.assertAlmostEqual(source.extent[2], layer.extent.max_x, 5)
|
|
||||||
self.assertAlmostEqual(source.extent[3], layer.extent.max_y, 5)
|
|
||||||
|
|
||||||
# Now checking the field names.
|
# Now checking the field names.
|
||||||
flds = layer.fields
|
flds = layer.fields
|
||||||
|
|
Loading…
Reference in New Issue