Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add some more provider tests for feature count when subset string is …
…added/removed
  • Loading branch information
nyalldawson committed Nov 18, 2017
1 parent e9e7efc commit 957cf65
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/src/python/providertestbase.py
Expand Up @@ -344,14 +344,15 @@ def testUniqueStringsMatching(self):
self.assertEqual(set(values), set(['Pear', 'Apple']))

def testFeatureCount(self):
assert self.source.featureCount() == 5, 'Got {}'.format(self.source.featureCount())
self.assertEqual(self.source.featureCount(), 5)

#Add a subset string and test feature count
subset = self.getSubsetString()
self.source.setSubsetString(subset)
count = self.source.featureCount()
self.source.setSubsetString(None)
assert count == 3, 'Got {}'.format(count)
self.assertEqual(count, 3)
self.assertEqual(self.source.featureCount(), 5)

def testGetFeaturesNoGeometry(self):
""" Test that no geometry is present when fetching features without geometry"""
Expand Down

0 comments on commit 957cf65

Please sign in to comment.