Skip to content


Browse files Browse the repository at this point in the history
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 f9917b5
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions tests/src/python/
Expand Up @@ -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(

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

Expand Down
Binary file modified tests/testdata/provider/shapefile.dbf
Binary file not shown.
Binary file modified tests/testdata/provider/shapefile.shp
Binary file not shown.
Binary file modified tests/testdata/provider/shapefile.shx
Binary file not shown.

0 comments on commit f9917b5

Please sign in to comment.