def test_loading_base_test_fonts(self): loadTestFonts()
from qgis.testing import start_app, unittest from qgis.testing.mocked import get_iface from utilities import ( unitTestDataPath, getTempfilePath, renderMapToImage, loadTestFonts, getTestFont, openInBrowserTab ) start_app(sys.platform != 'darwin') # No cleanup on mac os x, it crashes the pallabellingcanvas test on exit FONTSLOADED = loadTestFonts() PALREPORT = 'PAL_REPORT' in os.environ PALREPORTS = {} # noinspection PyPep8Naming,PyShadowingNames class TestQgsPalLabeling(unittest.TestCase): _TestDataDir = unitTestDataPath() _PalDataDir = os.path.join(_TestDataDir, 'labeling') _PalFeaturesDb = os.path.join(_PalDataDir, 'pal_features_v3.sqlite') _TestFont = getTestFont() # Roman at 12 pt """:type: QFont""" _MapRegistry = None """:type: QgsMapLayerRegistry"""
from qgis.core import (QgsCoordinateReferenceSystem, QgsDataSourceUri, QgsLabelingEngineSettings, QgsProject, QgsMapSettings, QgsPalLabeling, QgsPalLayerSettings, QgsProviderRegistry, QgsVectorLayer, QgsMultiRenderChecker, QgsUnitTypes) from qgis.testing import start_app, unittest from qgis.testing.mocked import get_iface from utilities import (unitTestDataPath, getTempfilePath, renderMapToImage, loadTestFonts, getTestFont, openInBrowserTab) start_app( sys.platform != 'darwin' ) # No cleanup on mac os x, it crashes the pallabelingcanvas test on exit FONTSLOADED = loadTestFonts() PALREPORT = 'PAL_REPORT' in os.environ PALREPORTS = {} # noinspection PyPep8Naming,PyShadowingNames class TestQgsPalLabeling(unittest.TestCase): _TestDataDir = unitTestDataPath() _PalDataDir = os.path.join(_TestDataDir, 'labeling') _PalFeaturesDb = os.path.join(_PalDataDir, 'pal_features_v3.sqlite') _TestFont = getTestFont() # Roman at 12 pt """:type: QFont""" _MapRegistry = None """:type: QgsProject"""