from processing.parameters.ParameterNumber import ParameterNumber from processing.parameters.ParameterString import ParameterString from processing.parameters.ParameterBoolean import ParameterBoolean from processing.core.outputs import OutputRaster from processing.core.outputs import OutputVector from utilities_test import getQgisTestApp # Add parent directory to path to make test aware of other modules pardir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) sys.path.append(pardir) sys.path.append(qgis.utils.sys_plugin_path) (QGISAPP, CANVAS, IFACE, PARENT) = getQgisTestApp() class bcolors: INFO = '\033[94m' WARNING = '\033[91m' ENDC = '\033[0m' class ProcessingPluginTest(unittest.TestCase): """Test suite for Processing QGis plugin.""" def test_createplugin(self): """Initialize plugin.""" self.processingplugin = ProcessingPlugin(IFACE)
the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __author__ = '*****@*****.**' __version__ = '0.3.0' __date__ = '21/02/2011' __copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' 'Disaster Reduction') import unittest # Needed though not used below from PyQt4.QtGui import QApplication from utilities_test import getQgisTestApp QGISAPP, CANVAS, IFACE, PARENT = getQgisTestApp() from is_help import ISHelp class ISHelpTest(unittest.TestCase): """Test the InaSAFE help GUI .. note:: Currently these tests will all fail unless you comment out the APP.exec_() lines because the web view does not load content without the main application event loop running. """ def XtestDialogLoads(self): """Basic test to ensure the keyword dialog has loaded""" myHelp = ISHelp(PARENT) #myHelp.show()
the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __author__ = '*****@*****.**' __version__ = '0.0.1' __date__ = '20/01/2011' __copyright__ = ('Copyright 2012, Australia Indonesia Facility for ' 'Disaster Reduction') import unittest from qgis.core import QgsProviderRegistry from utilities_test import getQgisTestApp QGISAPP = getQgisTestApp() class RiabTest(unittest.TestCase): """Test the QGIS Environment""" def test_QGISEnvironment(self): """QGIS environment has the expected providers""" r = QgsProviderRegistry.instance() #for item in r.providerList(): # print str(item) #print 'Provider count: %s' % len(r.providerList()) assert 'gdal' in r.providerList() assert 'ogr' in r.providerList()