Skip to content
Permalink
Browse files

Allow skipping crs check in processing test results

The GML format often requires extra 'hand holding' in order to
get QGIS to detect it's CRS (e.g. GML files created directly
in GDAL will not have an autodetected CRS when pulled into
QGIS). This needs fixing, but as a workaround to allow
processing algorithm porting to continue we can now skip
the crs check for these layers.
  • Loading branch information
nyalldawson committed Aug 13, 2017
1 parent 0a365b2 commit b87b2fe8279d5678973de54b5b0c212cf9ea05ba
@@ -102,6 +102,8 @@ tests:
OUTPUT:
name: expected/gdal/points_along_lines.gml
type: vector
compare:
ignore_crs_check: true

# - algorithm: gdal:offsetlinesforlines
# name: Offset lines for lines (right-handed)
@@ -86,10 +86,11 @@ def checkLayersEqual(self, layer_expected, layer_result, use_asserts=False, **kw
compare = {}

# Compare CRS
if use_asserts:
_TestCase.assertEqual(self, layer_expected.dataProvider().crs().authid(), layer_result.dataProvider().crs().authid())
elif not layer_expected.dataProvider().crs().authid() == layer_result.dataProvider().crs().authid():
return False
if 'ignore_crs_check' not in compare or not compare['ignore_crs_check']:
if use_asserts:
_TestCase.assertEqual(self, layer_expected.dataProvider().crs().authid(), layer_result.dataProvider().crs().authid())
elif not layer_expected.dataProvider().crs().authid() == layer_result.dataProvider().crs().authid():
return False

# Compare features
if use_asserts:

0 comments on commit b87b2fe

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