Opened 10 years ago
Closed 10 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 , 10 years ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 10 years ago
comment:3 by , 10 years ago
| Has patch: | set |
|---|
Note:
See TracTickets
for help on using tickets.
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!