Opened 16 years ago

Closed 16 years ago

#9738 closed (wontfix)

unit test examples in docs use old "failUnless" methods instead of new "assert" methods

Reported by: brandon Owned by: nobody
Component: Documentation Version: 1.0
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The unit testing examples are using the old "failUnlessEqual" UnitTest method instead of the new "assertEquals" methods. The "fail*" methods might become deprecated soon in the 2.x series, and I think have gone away completely in Python 3, so we should be teaching the Django legions to use the more modern names.

Change History (1)

comment:1 by Malcolm Tredinnick, 16 years ago

Resolution: wontfix
Status: newclosed

Those methods still exist, so using them is fine. Django supports Python 2.3 - 2.6, all of which have those methods. If we changed to use the new methods, we'd end up having to add a note to mention the alternative names for Python 2.3, which makes things seem more complicated than they really are.

This isn't worth changing at the moment, since it works fine with all the Python we support. There'll be lots of changes for Python 3 and we don't run on that at the moment.

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