Django

Code

Ticket #9738 (closed: wontfix)

Opened 7 months ago

Last modified 7 months ago

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

Reported by: brandon Assigned to: nobody
Milestone: Component: Documentation
Version: 1.0 Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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.

Attachments

Change History

12/02/08 22:45:30 changed by mtredinnick

  • status changed from new to closed.
  • needs_better_patch changed.
  • resolution set to wontfix.
  • needs_tests changed.
  • needs_docs changed.

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.


Add/Change #9738 (unit test examples in docs use old "failUnless" methods instead of new "assert" methods)




Change Properties
Action