Пример #1
0
if os.name == 'nt':
    print("TestQgisLocalServer currently doesn't support windows")
    sys.exit(0)

from qgis.core import (QgsRectangle, QgsCoordinateReferenceSystem,
                       QgsRenderChecker)

from qgis_local_server import getLocalServer

from qgis.testing import (start_app, unittest)

from utilities import openInBrowserTab, getTempfilePath

start_app()
MAPSERV = getLocalServer()

QGIS_TEST_REPORT = 'QGIS_TEST_REPORT' in os.environ
TESTREPORTS = {}


class TestQgisLocalServer(unittest.TestCase):
    @classmethod
    def setUpClass(cls):
        """Run before all tests"""
        # setup server controller class

        # verify controller can re-initialize processes and temp directory setup
        MAPSERV.startup()  # should recreate tempdir
        msg = 'Server processes could not be restarted'
        assert MAPSERV.processes_running(), msg
Пример #2
0
    QgsRectangle,
    QgsCoordinateReferenceSystem,
    QgsRenderChecker
)

from qgis_local_server import getLocalServer

from qgis.testing import (
    start_app,
    unittest
)

from utilities import openInBrowserTab, getTempfilePath

start_app()
MAPSERV = getLocalServer()

QGIS_TEST_REPORT = 'QGIS_TEST_REPORT' in os.environ
TESTREPORTS = {}


class TestQgisLocalServer(unittest.TestCase):

    @classmethod
    def setUpClass(cls):
        """Run before all tests"""
        # setup server controller class

        # verify controller can re-initialize processes and temp directory setup
        MAPSERV.startup()  # should recreate tempdir
        msg = 'Server processes could not be restarted'