Opened 4 years ago

Closed 4 years ago

#26512 closed Cleanup/optimization (fixed)

Add tests for the SpatialRefSysMixin.get_units() method

Reported by: Tim Graham Owned by: Nicolas Noé
Component: GIS Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


The method isn't covered by tests since it's unused since ae7cb577ddbea48aaed26cbbf69c77078a99e221. Claude said there's value in keeping the method around though.

Change History (4)

comment:1 Changed 4 years ago by Nicolas Noé

Owner: changed from nobody to Nicolas Noé
Status: newassigned

comment:2 Changed 4 years ago by Nicolas Noé

Hi, I'm a new contributor and did my best here in my pull request.

In addition to testing the class method, I updated the docstring since it was outdated and a bit vague IMHO and fixed a small issue with it: when GDAL was present, the unit was returned as a float (seems good), but as a string when GDAL was unavailable. It's now properly casted to a float in such cases.

Cricticism is more than welcome!

comment:3 Changed 4 years ago by Nicolas Noé

Has patch: set

comment:4 Changed 4 years ago by Tim Graham <timograham@…>

Resolution: fixed
Status: assignedclosed

In 23fbd3f:

Fixed #26512 -- Added tests for SpatialRefSysMixin.get_units().

Note: See TracTickets for help on using tickets.
Back to Top