[Qgis-developer] Setting up test with plugin..

Martin Dobias wonder.sk at gmail.com
Thu Apr 11 01:42:53 PDT 2013

Hi Chris

On Thu, Apr 11, 2013 at 9:58 AM, Chris Crook <ccrook at linz.govt.nz> wrote:
> Hi All
> I'm fixing a long standing bug in the delimited text plugin (new lines in quoted fields in CSV files), and as part of this I want to build some tests. I'm starting from test_qgsmemoryprovider.py, which seems to be a good starting point, except that before I can run any tests I need to install the plugin.

Are you trying to test the provider or the (GUI) plugin?

The provider can be tested easily by creating a QgsVectorLayer
instance with the "delimitedtext" provider string. It is only
necessary to initialize QGIS core library which will in turn
initialize provider registry (and load all providers). The memory
provider test uses a convenience function getQgisTestApp() from

To my knowledge it is not possible to test the plugin:
QgsPluginRegistry is not a part of qgis libraries, it's a class
belonging to QGIS executable, so you cannot access it.


More information about the Qgis-developer mailing list