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)
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)
def testCanBeRegistered(self): QgsExpression.registerFunction(self.testfun) index = QgsExpression.functionIndex('testfun') self.assertNotEqual(index, -1)
def testCanBeRegistered(self): QgsExpression.registerFunction(self.testfun) index = QgsExpression.functionIndex('testfun') self.assertTrue(not index == -1)