Skip to content
Permalink
Browse files

Adjust tests

  • Loading branch information
m-kuhn committed Jun 4, 2018
1 parent 5b0473a commit a016254386541ea97f2dddae5249625c034cd1af
Showing with 4 additions and 1 deletion.
  1. +4 −1 tests/src/python/providertestbase.py
@@ -28,6 +28,7 @@
QgsVectorLayerFeatureSource,
QgsFeatureSink,
QgsTestUtils,
QgsFeatureSource,
NULL
)

@@ -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())

0 comments on commit a016254

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