mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-16 00:03:12 -04:00
Revert "[processing] added test for invalid geometry checking"
This reverts commit 306764871baab544f9566b327d2188a5b1fc8938. Test is failing
This commit is contained in:
parent
1500eadd2c
commit
4d51e1d1a1
@ -36,7 +36,3 @@ def table():
|
|||||||
|
|
||||||
def points():
|
def points():
|
||||||
return os.path.join(testDataPath, 'points.gml')
|
return os.path.join(testDataPath, 'points.gml')
|
||||||
|
|
||||||
def invalid_geometries():
|
|
||||||
return os.path.join(testDataPath, 'invalidgeometries.gml')
|
|
||||||
|
|
||||||
|
@ -99,22 +99,8 @@ class VectorTest(unittest.TestCase):
|
|||||||
features = vector.features(test_layer, QgsFeatureRequest().setFlags(QgsFeatureRequest.NoGeometry))
|
features = vector.features(test_layer, QgsFeatureRequest().setFlags(QgsFeatureRequest.NoGeometry))
|
||||||
self.assertEqual(set([f.id() for f in features]), set([2, 4, 6]))
|
self.assertEqual(set([f.id() for f in features]), set([2, 4, 6]))
|
||||||
|
|
||||||
#test exception is raised when filtering invalid geoms
|
|
||||||
test_layer_invalid_geoms = QgsVectorLayer(invalid_geometries(), 'test', 'ogr')
|
|
||||||
|
|
||||||
previous_value_invalid_geoms = ProcessingConfig.getSetting(ProcessingConfig.FILTER_INVALID_GEOMETRIES)
|
|
||||||
ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, 2)
|
|
||||||
try:
|
|
||||||
features = vector.features(test_layer_invalid_geoms)
|
|
||||||
features = [f for f in features]
|
|
||||||
self.fail()
|
|
||||||
except GeoAlgorithmExecutionException:
|
|
||||||
pass
|
|
||||||
|
|
||||||
ProcessingConfig.setSettingValue(ProcessingConfig.FILTER_INVALID_GEOMETRIES, previous_value_invalid_geoms)
|
|
||||||
ProcessingConfig.setSettingValue(ProcessingConfig.USE_SELECTED, previous_value)
|
ProcessingConfig.setSettingValue(ProcessingConfig.USE_SELECTED, previous_value)
|
||||||
|
|
||||||
|
|
||||||
def testValues(self):
|
def testValues(self):
|
||||||
ProcessingConfig.initialize()
|
ProcessingConfig.initialize()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user