From 2fb77c7db9b17e991725ccbb75269aee12f4dd9a Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 28 Nov 2024 09:52:53 +1000 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Even Rouault --- tests/src/python/test_qgsprojectionselectionwidgets.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/src/python/test_qgsprojectionselectionwidgets.py b/tests/src/python/test_qgsprojectionselectionwidgets.py index 8eb5312beab5..a89b604988f1 100644 --- a/tests/src/python/test_qgsprojectionselectionwidgets.py +++ b/tests/src/python/test_qgsprojectionselectionwidgets.py @@ -322,13 +322,13 @@ def testTreeWidgetGettersSetters(self): def testTreeWidgetUnknownCrs(self): w = QgsProjectionSelectionTreeWidget() self.assertFalse(w.hasValidSelection()) - crs = QgsCoordinateReferenceSystem.fromWkt('GEOGCS["WGS 84",DATUM["unknown",SPHEROID["WGS84",6378237,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]') + crs = QgsCoordinateReferenceSystem.fromWkt('GEOGCS["unknown",DATUM["unknown",SPHEROID["unknown",6378237,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]]') self.assertTrue(crs.isValid()) w.setCrs(crs) self.assertTrue(w.crs().isValid()) self.assertFalse(w.crs().authid()) self.assertTrue(w.hasValidSelection()) - self.assertEqual(w.crs().toWkt(QgsCoordinateReferenceSystem.WktVariant.WKT2_2018), 'GEOGCRS["WGS 84",DATUM["unknown",ELLIPSOID["WGS84",6378237,298.257223563,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]]]') + self.assertEqual(w.crs().toWkt(QgsCoordinateReferenceSystem.WktVariant.WKT2_2018), 'GEOGCRS["unknown",DATUM["unknown",ELLIPSOID["unknown",6378237,298.257223563,LENGTHUNIT["metre",1,ID["EPSG",9001]]]],PRIMEM["Greenwich",0,ANGLEUNIT["degree",0.0174532925199433]],CS[ellipsoidal,2],AXIS["longitude",east,ORDER[1],ANGLEUNIT["degree",0.0174532925199433]],AXIS["latitude",north,ORDER[2],ANGLEUNIT["degree",0.0174532925199433]]]') def testTreeWidgetNotSetOption(self): """ test allowing no projection option for QgsProjectionSelectionTreeWidget """