本文整理汇总了Python中test_qgspallabeling_base.TestQgsPalLabeling.setUpClass方法的典型用法代码示例。如果您正苦于以下问题:Python TestQgsPalLabeling.setUpClass方法的具体用法?Python TestQgsPalLabeling.setUpClass怎么用?Python TestQgsPalLabeling.setUpClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类test_qgspallabeling_base.TestQgsPalLabeling
的用法示例。
在下文中一共展示了TestQgsPalLabeling.setUpClass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
TestQgsPalLabeling.setUpClass()
cls.setUpServerProjectAndDir(TESTPROJPATH, TESTPROJDIR)
cls.layer = TestQgsPalLabeling.loadFeatureLayer('background')
cls.layer = TestQgsPalLabeling.loadFeatureLayer('point')
cls.checkmismatch = 1000
cls.checkgroup = ''
示例2: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
TestQgsPalLabeling.setUpClass()
cls._TestProj = QgsProject.instance()
cls._TestProj.setFileName(str(TESTPROJPATH).strip())
if not cls._TestProjSetup:
try:
shutil.copy(cls._PalFeaturesDb, TESTPROJDIR)
for qml in glob.glob(cls._PalDataDir + os.sep + '*.qml'):
shutil.copy(qml, TESTPROJDIR)
except IOError, e:
raise IOError(str(e) +
'\nCould not set up test server directory')
cls._TestProjSetup = True
示例3: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
if not cls._BaseSetup:
TestQgsPalLabeling.setUpClass()
MAPSERV.startup()
MAPSERV.web_dir_install(glob.glob(cls._PalDataDir + os.sep + '*.qml'))
# noinspection PyArgumentList
cls._TestProj = QgsProject.instance()
cls._TestProjName = 'pal_test.qgs'
cls._TestProj.setFileName(
os.path.join(MAPSERV.web_dir(), cls._TestProjName))
# the blue background (set via layer style) to match renderchecker's
TestQgsPalLabeling.loadFeatureLayer('background', True)
settings = QSettings()
# noinspection PyArgumentList
cls._CacheDir = settings.value(
"cache/directory", QgsApplication.qgisSettingsDirPath() + "cache")
示例4: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
TestQgsPalLabeling.setUpClass()
MAPSERV.startup()
MAPSERV.web_dir_install(glob.glob(cls._PalDataDir + os.sep + '*.qml'))
# noinspection PyArgumentList
cls._TestProj = QgsProject.instance()
cls._TestProjName = 'pal_test.qgs'
cls._TestProj.setFileName(
os.path.join(MAPSERV.web_dir(), cls._TestProjName))
# the blue background (set via layer style) to match renderchecker's
cls._BkgrdLayer = TestQgsPalLabeling.loadFeatureLayer('background')
cls._CheckMismatch = 200 # default for server tests; mismatch expected
cls._CheckGroup = '' # default '' will check against server control
settings = QSettings()
# noinspection PyArgumentList
cls._CacheDir = settings.value(
"cache/directory", QgsApplication.qgisSettingsDirPath() + "cache")
示例5: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
if not cls._BaseSetup:
TestQgsPalLabeling.setUpClass()
示例6: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
if not cls._BaseSetup:
TestQgsPalLabeling.setUpClass()
cls._Pal.setDrawLabelRectOnly(True)
cls._Pal.saveEngineSettings()
示例7: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
TestQgsPalLabeling.setUpClass()
cls.layer = TestQgsPalLabeling.loadFeatureLayer('point')
示例8: setUpClass
# 需要导入模块: from test_qgspallabeling_base import TestQgsPalLabeling [as 别名]
# 或者: from test_qgspallabeling_base.TestQgsPalLabeling import setUpClass [as 别名]
def setUpClass(cls):
TestQgsPalLabeling.setUpClass()
# the blue background (set via layer style) to match renderchecker's
cls._BkgrdLayer = TestQgsPalLabeling.loadFeatureLayer('background')
cls._CheckMismatch = 0 # mismatch expected for crosscheck
cls._CheckGroup = ''