Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Even Rouault <[email protected]>
  • Loading branch information
nyalldawson and rouault committed Nov 29, 2024
1 parent e516d07 commit 2fb77c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/src/python/test_qgsprojectionselectionwidgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 """
Expand Down

0 comments on commit 2fb77c7

Please sign in to comment.