Skip to content

Commit

Permalink
Add test for empty() to provider test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 4, 2018
1 parent b568d6b commit 94f3e13
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/src/python/providertestbase.py
Expand Up @@ -415,6 +415,21 @@ def testFeatureCount(self):
self.assertEqual(count, 0)
self.assertEqual(self.source.featureCount(), 5)

def testEmpty(self):
self.assertFalse(self.source.empty())
self.assertFalse(self.source.emptyUnknown())

if self.source.supportsSubsetString():
# Add a subset string and test feature count
subset = self.getSubsetString()
self.source.setSubsetString(subset)
self.assertFalse(self.source.empty())
subsetNoMatching = getSubsetStringNoMatching(self)
self.source.setSubsetString(subsetNoMatching)
self.assertTrue(self.source.empty())
self.source.setSubsetString(None)
self.assertFalse(self.source.empty())

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

Expand Down

0 comments on commit 94f3e13

Please sign in to comment.