def testDialogNotSetOption(self):
        """ test allowing no projection option for QgsProjectionSelectionTreeWidget """
        w = QgsProjectionSelectionDialog()
        w.show()
        w.setShowNoProjection(True)
        self.assertTrue(w.showNoProjection())
        w.setShowNoProjection(False)
        self.assertFalse(w.showNoProjection())

        w.setShowNoProjection(True)
        w.setCrs(QgsCoordinateReferenceSystem())
        self.assertFalse(w.crs().isValid())
예제 #2
0
    def testDialogNotSetOption(self):
        """ test allowing no projection option for QgsProjectionSelectionTreeWidget """
        w = QgsProjectionSelectionDialog()
        w.show()
        w.setShowNoProjection(True)
        self.assertTrue(w.showNoProjection())
        w.setShowNoProjection(False)
        self.assertFalse(w.showNoProjection())

        w.setShowNoProjection(True)
        w.setCrs(QgsCoordinateReferenceSystem())
        self.assertFalse(w.crs().isValid())
예제 #3
0
 def testDialogGettersSetters(self):
     """ basic tests for QgsProjectionSelectionTreeWidget """
     w = QgsProjectionSelectionDialog()
     w.show()
     w.setCrs(QgsCoordinateReferenceSystem('EPSG:3111'))
     self.assertEqual(w.crs().authid(), 'EPSG:3111')
 def testDialogGettersSetters(self):
     """ basic tests for QgsProjectionSelectionTreeWidget """
     w = QgsProjectionSelectionDialog()
     w.show()
     w.setCrs(QgsCoordinateReferenceSystem('EPSG:3111'))
     self.assertEqual(w.crs().authid(), 'EPSG:3111')