Example #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')
Example #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')
Example #3
0
 def testAppRegistry(self):
     # ensure there is an application instance
     self.assertIsNotNone(QgsApplication.validityCheckRegistry())
Example #4
0
 def testAppRegistry(self):
     # ensure there is an application instance
     self.assertIsNotNone(QgsApplication.validityCheckRegistry())