本文整理汇总了Python中safe_qgis.utilities_test.getQgisTestApp函数的典型用法代码示例。如果您正苦于以下问题:Python getQgisTestApp函数的具体用法?Python getQgisTestApp怎么用?Python getQgisTestApp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了getQgisTestApp函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。
示例1: import
__author__ = '[email protected]'
__date__ = '20/01/2011'
__copyright__ = ('Copyright 2012, Australia Indonesia Facility for '
'Disaster Reduction')
import os
import unittest
from qgis.core import (
QgsProviderRegistry,
QgsCoordinateReferenceSystem,
QgsRasterLayer)
from safe_qgis.utilities_test import getQgisTestApp
from safe_interface import EXPDATA
QGISAPP = getQgisTestApp()
class QGISTest(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()
开发者ID:jjdida25,项目名称:inasafe,代码行数:30,代码来源:test_qgis_environment.py
示例2: import
isLayerPolygonal,
getLayerAttributeNames,
impactLayerAttribution,
dpiToMeters,
_addMinMaxToStyle)
from safe_qgis.utilities_test import (unitTestDataPath,
loadLayer,
getQgisTestApp)
from safe_qgis.exceptions import StyleError
from safe.common.exceptions import BoundingBoxError
from safe_qgis.test_keywords_dialog import (makePolygonLayer,
makePadangLayer,
makePointLayer)
from safe_qgis.utilities import getDefaults
QGISAPP, CANVAS, IFACE, PARENT = getQgisTestApp()
class UtilitiesTest(unittest.TestCase):
"""Tests for reading and writing of raster and vector data
"""
def setUp(self):
os.environ['LANG'] = 'en'
def tearDown(self):
pass
def test_stacktrace_html(self):
"""Stack traces can be caught and rendered as html
"""
开发者ID:fivejjs,项目名称:inasafe,代码行数:31,代码来源:test_utilities.py
注:本文中的safe_qgis.utilities_test.getQgisTestApp函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论