Ejemplo n.º 1
0
    def testDecorator(self):
        # test that checks registered using the decorator have worked
        self.assertEqual(len(QgsApplication.validityCheckRegistry().checks()), 2)

        context = TestContext()
        feedback = QgsFeedback()
        res = QgsApplication.validityCheckRegistry().runChecks(QgsAbstractValidityCheck.TypeLayoutCheck, context, feedback)
        self.assertEqual(len(res), 1)
        self.assertEqual(res[0].title, 'test')
Ejemplo n.º 2
0
    def testDecorator(self):
        # test that checks registered using the decorator have worked
        self.assertEqual(len(QgsApplication.validityCheckRegistry().checks()), 2)

        context = TestContext()
        feedback = QgsFeedback()
        res = QgsApplication.validityCheckRegistry().runChecks(QgsAbstractValidityCheck.TypeLayoutCheck, context, feedback)
        self.assertEqual(len(res), 1)
        self.assertEqual(res[0].title, 'test')
Ejemplo n.º 3
0
 def testAppRegistry(self):
     # ensure there is an application instance
     self.assertIsNotNone(QgsApplication.validityCheckRegistry())
Ejemplo n.º 4
0
 def testAppRegistry(self):
     # ensure there is an application instance
     self.assertIsNotNone(QgsApplication.validityCheckRegistry())