Skip to content
Permalink
Browse files

Add test for empty() to provider test suite

  • Loading branch information
m-kuhn committed Jun 4, 2018
1 parent b568d6b commit 94f3e139087a89ba58cb73c1ba8cc56be561f691
Showing with 15 additions and 0 deletions.
  1. +15 −0 tests/src/python/providertestbase.py
@@ -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"""

0 comments on commit 94f3e13

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