Skip to content
Permalink
Browse files

[processing] Fix exception when creating unit tests

  • Loading branch information
nyalldawson committed Mar 21, 2019
1 parent c7ac866 commit af06cf0cd26966d86dfb0f25e77e06136e14b2d3
Showing with 8 additions and 1 deletion.
  1. +8 −1 python/plugins/processing/gui/TestTools.py
@@ -135,7 +135,14 @@ def splitAlgIdAndParameters(command):
"""
exp = re.compile(r"""['"](.*?)['"]\s*,\s*(.*)""")
m = exp.search(command[len('processing.run('):-1])
return m.group(1), ast.literal_eval(m.group(2))
alg_id = m.group(1)
params = m.group(2)

# replace QgsCoordinateReferenceSystem('EPSG:4325') with just string value
exp = re.compile(r"""QgsCoordinateReferenceSystem\((['"].*?['"])\)""")
params = exp.sub('\\1', params)

return alg_id, ast.literal_eval(params)


def createTest(text):

0 comments on commit af06cf0

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