예제 #1
0
 def testCanUnregisterFunction(self):
     QgsExpression.registerFunction(self.testfun)
     index = QgsExpression.functionIndex('testfun')
     self.assertNotEqual(index, -1)
     error = QgsExpression.unregisterFunction('testfun')
     self.assertTrue(error)
     index = QgsExpression.functionIndex('testfun')
     self.assertEqual(index, -1)
예제 #2
0
 def testCanUnregisterFunction(self):
     QgsExpression.registerFunction(self.testfun)
     index = QgsExpression.functionIndex("testfun")
     self.assertTrue(not index == -1)
     error = QgsExpression.unregisterFunction("testfun")
     self.assertTrue(error)
     index = QgsExpression.functionIndex("testfun")
     self.assertTrue(index == -1)
예제 #3
0
 def testCanBeRegistered(self):
     QgsExpression.registerFunction(self.testfun)
     index = QgsExpression.functionIndex('testfun')
     self.assertNotEqual(index, -1)
예제 #4
0
 def testCanBeRegistered(self):
     QgsExpression.registerFunction(self.testfun)
     index = QgsExpression.functionIndex('testfun')
     self.assertTrue(not index == -1)
예제 #5
0
 def testCanBeRegistered(self):
     QgsExpression.registerFunction(self.testfun)
     index = QgsExpression.functionIndex('testfun')
     self.assertTrue(not index == -1)