Skip to content


Fix failing expression test
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed May 27, 2015
1 parent f234810 commit 26e6725
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/src/python/
Expand Up @@ -31,7 +31,7 @@ def autocount(value1, value2, value3, feature, parent):
def expandargs(value1, value2, value3, feature, parent):
return value1, value2, value3

@qgsfunction(0, 'testing', register=False)
@qgsfunction(args=0, group='testing', register=False)
def special(values, feature, parent):
return "test"

Expand Down Expand Up @@ -82,9 +82,13 @@ def testCanEvaluateFunction(self):
result = exp.evaluate()
self.assertEqual('Testing_1', result)

def testZeroArgFunctionsAreSpecialColumns(self):
def testZeroArgFunctionsTakeNoArgs(self):
special = self.special
self.assertEqual(, '$special')
self.assertEqual(, 'special')
exp = QgsExpression('special()')
result = exp.evaluate()
self.assertEqual('test', result)

def testDecoratorPreservesAttributes(self):
func = self.testfun
Expand Down

0 comments on commit 26e6725

Please sign in to comment.