Skip to content
Permalink
Browse files

Revert "[processing] added test for invalid geometry checking"

This reverts commit 3067648.

Test is failing
  • Loading branch information
nyalldawson committed Jan 9, 2017
1 parent 1500ead commit 4d51e1d1a100c014665bb8097fb9e77fbf3deec8
Showing with 0 additions and 18 deletions.
  1. +0 −4 python/plugins/processing/tests/TestData.py
  2. +0 −14 python/plugins/processing/tests/ToolsTest.py
@@ -36,7 +36,3 @@ def table():

def points():
return os.path.join(testDataPath, 'points.gml')

def invalid_geometries():
return os.path.join(testDataPath, 'invalidgeometries.gml')

@@ -99,22 +99,8 @@ def testFeatures(self):
features = vector.features(test_layer, QgsFeatureRequest().setFlags(QgsFeatureRequest.NoGeometry))
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)


def testValues(self):
ProcessingConfig.initialize()

0 comments on commit 4d51e1d

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