Opened 8 years ago

Closed 8 years ago

#7456 closed (fixed)

IndexError message should not be checked (for Jython compatibility)

Reported by: Leo Soto M. Owned by: nobody
Component: Testing framework Version: master
Severity: Keywords: jython
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Jython has a slightly different message for IndexErrors:

>>> [][0]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: index out of range: 0

As it has information that is not present on CPython messages (the index which caused the error), Jython is not going to change this message to match exactly the CPython one.

The attached patch fixes the only place where the Django test suite is checking for the exact error message.

Attachments (1)

dont_check_index_error_msg.patch (868 bytes) - added by Leo Soto M. 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by Leo Soto M.

comment:1 Changed 8 years ago by Simon Greenhill

Component: UncategorizedUnit test system
Triage Stage: UnreviewedReady for checkin

comment:2 Changed 8 years ago by Adrian Holovaty

Resolution: fixed
Status: newclosed

(In [7646]) Fixed #7456 -- Removed check of exact IndexError exception text in a unit test, for Jython compatibility. Thanks, leosoto

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