Opened 5 years ago

Closed 5 years ago

#29931 closed Cleanup/optimization (fixed)

Remove untested ValueError catching in naturalday template filter

Reported by: Hasan Ramezani Owned by: Hasan Ramezani
Component: contrib.humanize Version: 2.1
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: yes
Easy pickings: no UI/UX: no

Description (last modified by Tim Graham)

This branch is untested:

except ValueError:
        # Date arguments out of range

I don't see how that branch could happen if value is a date.

Change History (4)

comment:1 by Hasan Ramezani, 5 years ago

Owner: changed from nobody to Hasan Ramezani
Status: newassigned

comment:2 by Hasan Ramezani, 5 years ago

Has patch: set

comment:3 by Tim Graham, 5 years ago

Description: modified (diff)
Patch needs improvement: set
Summary: Improve `contrib.humanize.templatetags.humanize.naturalday` and add more test for itRemove untested ValueError catching in naturalday template filter
Triage Stage: UnreviewedAccepted

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

Resolution: fixed
Status: assignedclosed

In f62cf22:

Fixed #29931 -- Removed unused ValueError handling in naturalday template tag.

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