Skip to content
Permalink
Browse files

Remove expected failure from shapefile provider unique values test

Failure was caused by GDAL bug #6020, which has now been fixed
in GDAL. It turns out the values are only incorrect if the first
feature in the file has a null value, so I've rearranged the
features in the reference shapefile to avoid this.
  • Loading branch information
nyalldawson committed Jul 12, 2015
1 parent 8e12578 commit f9917b55c380c351ee6b7300ca147152e4671445
@@ -54,16 +54,6 @@ def tearDownClass(cls):
shutil.rmtree(cls.basetestpath, True)
shutil.rmtree(cls.repackfilepath, True)

def testUnique(self):
"""
Override parent method because OGR doesn't return NULL values in SELECT DISTINCT...
This is only to make the tests pass, not to define this as expected behavior so if it is possible to remove this
in the future even better.
"""
assert set(self.provider.uniqueValues(1)) == set([-200, 100, 200, 300, 400])
assert set([u'Apple', u'Honey', u'Orange', u'Pear']) == set(self.provider.uniqueValues(2)), 'Got {}'.format(
set(self.provider.uniqueValues(2)))

def testRepack(self):
vl = QgsVectorLayer(u'{}|layerid=0'.format(self.repackfile), u'test', u'ogr')

Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit f9917b5

Please sign in to comment.
You can’t perform that action at this time.