Opened 9 years ago

Closed 9 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: dev
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

Description

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 by Nicolas Noé, 9 years ago

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

comment:2 by Nicolas Noé, 9 years ago

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 by Nicolas Noé, 9 years ago

Has patch: set

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

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