Skip to content
Permalink
Browse files

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 957cf652aa10cc0ec4730a2e4b1b908e2d119ce0
Showing with 3 additions and 2 deletions.
  1. +3 −2 tests/src/python/providertestbase.py
@@ -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"""

0 comments on commit 957cf65

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