[Qgis-developer] MetaSearch core merge test failures

Tom Kralidis tomkralidis at gmail.com
Thu Dec 11 11:06:02 PST 2014

As part of merging MetaSearch into core QGIS I have issued the following PR:


As part of the PR there is a rudimentary test in
which serves as baseline.

You can see in https://github.com/geopython/QGIS/blob/MetaSearch-merge-core/tests/src/python/test_qgsmetasearch.py#L38-L43
that there is some brute force pathing to load the plugin.

When running locally (via xvfb-run ctest -V -R MetaSearch) I'm getting
errors like:

118: ERROR: test_plugin_metadata (__main__.TestQgsMetaSearch)
118: ----------------------------------------------------------------------
118: Traceback (most recent call last):
118:   File "/home/tkralidi/QGIS/QGIS/tests/src/python/test_qgsmetasearch.py",
line 43, in setUp
118:     self.plugin = MetaSearch.classFactory(IFACE)
118:   File "/home/tkralidi/QGIS/QGIS/build/output/python//plugins/MetaSearch/__init__.py",
line 32, in classFactory
118:     return MetaSearchPlugin(iface)
118:   File "/home/tkralidi/QGIS/QGIS/build/output/python//plugins/MetaSearch/plugin.py",
line 53, in __init__
118:     locale_name = QSettings().value("locale/userLocale")[0:2]
118: TypeError: 'QVariant' object has no attribute '__getitem__'
118: ----------------------------------------------------------------------
118: Ran 1 test in 0.578s

At this point I am getting totally different errors on travis-ci
(https://travis-ci.org/qgis/QGIS/builds/43747908), so I'm not sure
which way to debug.

Are there any examples of how to successfully load a Python plugin
from within a test script?



More information about the Qgis-developer mailing list