示例#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)