This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: unittest docs use deprecated method in code example
Type: Stage: resolved
Components: Documentation Versions: Python 3.1
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: ezio.melotti Nosy List: Bernt.Røskar.Brenna, ezio.melotti, georg.brandl
Priority: normal Keywords:

Created on 2010-02-07 20:46 by Bernt.Røskar.Brenna, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg99017 - (view) Author: Bernt Røskar Brenna (Bernt.Røskar.Brenna) * Date: 2010-02-07 20:46
Suggest change the code example to use assertRaises instead of failUnlessRaises.

The docs read:

assertRaises(exception[, callable, ...])¶
failUnlessRaises(exception[, callable, ...])¶
    ....

    with self.failUnlessRaises(some_error_class):
        do_something()

    ...

    Deprecated since version 3.1: failUnlessRaises()
msg99018 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-02-07 20:52
Thanks for the report, this is fixed in r77999 and r78000 in trunk and py3k, but it needs to be backported to 3.1.
msg99041 - (view) Author: Bernt Røskar Brenna (Bernt.Røskar.Brenna) * Date: 2010-02-08 09:20
Sorry, forgot to check svn, I was looking at the 3.1.1 release tarball.
msg99069 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-02-08 22:08
Fixed on 3.1 in r78111.
History
Date User Action Args
2022-04-11 14:56:57adminsetgithub: 52124
2010-02-08 22:08:45ezio.melottisetstatus: open -> closed
messages: + msg99069

assignee: georg.brandl -> ezio.melotti
resolution: fixed
stage: resolved
2010-02-08 09:20:05Bernt.Røskar.Brennasetmessages: + msg99041
2010-02-07 20:52:08ezio.melottisetpriority: normal
nosy: + ezio.melotti
messages: + msg99018

2010-02-07 20:46:37Bernt.Røskar.Brennacreate