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())
def testDialogGettersSetters(self): """ basic tests for QgsProjectionSelectionTreeWidget """ w = QgsProjectionSelectionDialog() w.show() w.setCrs(QgsCoordinateReferenceSystem('EPSG:3111')) self.assertEqual(w.crs().authid(), 'EPSG:3111')