Opened 3 years ago

Closed 3 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 Changed 3 years ago by Hasan Ramezani

Owner: changed from nobody to Hasan Ramezani
Status: newassigned

comment:2 Changed 3 years ago by Hasan Ramezani

Has patch: set

comment:3 Changed 3 years ago by Tim Graham

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 Changed 3 years ago by Tim Graham <timograham@…>

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