Skip to content

Commit 8175f51

Browse files
author
cpolymeris@gmail.com
committed
Test data providers loading, finally :)
git-svn-id: http://sextante.googlecode.com/svn/trunk/soft/bindings/qgis-plugin@303 881b9c09-3ef8-f3c2-ec3d-21d735c97f4d
1 parent fa4092f commit 8175f51

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

src/sextante/tests/qgis_interface.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,8 @@ def __init__(self, canvas):
3939
"""Constructor"""
4040
QObject.__init__(self)
4141
self.canvas = canvas
42-
QgsProviderRegistry.instance()
43-
self.testRaster = QgsRasterLayer('data/raster', "test raster")
44-
self.testVector = QgsVectorLayer('data/vector', "test vector")
45-
self.testRaster.dataProvider = lambda: QgsProviderRegistry.instance().provider('ogr','data/raster')
46-
self.testVector.dataProvider = lambda: QgsProviderRegistry.instance().provider('gdal','data/vector')
42+
self.testRaster = QgsRasterLayer('data/raster', "raster")
43+
self.testVector = QgsVectorLayer('data/vector', "vector", 'ogr')
4744

4845
def zoomFull(self):
4946
"""Zoom to the map full extent"""

src/sextante/tests/runtests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
PYTHONPATH=~/Proyectos/qgis/output/python/:~/Proyectos/qgis/python/plugins/ python test.py $@
1+
QGISPATH=/usr/local PYTHONPATH=~/Proyectos/qgis/output/python/:~/Proyectos/qgis/python/plugins/ python test.py $@

src/sextante/tests/utilities_test.py

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def getQgisTestApp():
4343
myPath = os.environ['QGISPATH']
4444
myUseDefaultPathFlag = True
4545
QGISAPP.setPrefixPath(myPath, myUseDefaultPathFlag)
46+
else:
47+
print "Warning: QGISPATH is not set"
4648

4749
QGISAPP.initQgis()
4850
s = QGISAPP.showSettings()

0 commit comments

Comments
 (0)