Skip to content

Commit

Permalink
Adjust tests
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Jun 4, 2018
1 parent 5b0473a commit a016254
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/src/python/providertestbase.py
Expand Up @@ -28,6 +28,7 @@
QgsVectorLayerFeatureSource,
QgsFeatureSink,
QgsTestUtils,
QgsFeatureSource,
NULL
)

Expand Down Expand Up @@ -417,16 +418,18 @@ def testFeatureCount(self):

def testEmpty(self):
self.assertFalse(self.source.empty())
self.assertFalse(self.source.emptyUnknown())
self.assertEqual(self.source.hasFeatures(), QgsFeatureSource.FeaturesAvailable)

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

Expand Down

0 comments on commit a016254

Please sign in to comment.