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: Deprecation markers in unittest docs are unclear
Type: Stage: resolved
Components: Documentation Versions: Python 3.1
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: georg.brandl Nosy List: Justin.Lebar, ezio.melotti, georg.brandl
Priority: normal Keywords:

Created on 2010-02-06 04:24 by Justin.Lebar, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg98933 - (view) Author: Justin Lebar (Justin.Lebar) Date: 2010-02-06 04:24
The documentation for assertTrue/assert_/failUnless reads:

assertTrue(expr, msg=None)
assert_(expr, msg=None)
failUnless(expr, msg=None)
    ...
    Deprecated since version 3.1: failUnless().

The deprecation warning is confusing, since it appears to suggest that failUnless is also deprecated.

Perhaps the last line could read 

  assertTrue and assert_ are deprecated since version 3.1: Use failUnless() instead.

And similarly for the rest of the assertX methods.
msg98934 - (view) Author: Ezio Melotti (ezio.melotti) * (Python committer) Date: 2010-02-06 04:30
> The deprecation warning is confusing, since it appears to suggest that failUnless is also deprecated.

That's exactly what the warning is saying: failUnless() is deprecated since version 3.1.
assertTrue and assert_ are ok.
msg98935 - (view) Author: Justin Lebar (Justin.Lebar) Date: 2010-02-06 04:34
Oh, I see.

I still think a complete sentence would be helpful here, although now that I understand that the colon doesn't mean "use instead" I suppose I'm less confused...
msg98938 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-02-06 10:09
I've added "use ... instead" now in r78018.
History
Date User Action Args
2022-04-11 14:56:57adminsetgithub: 52112
2010-02-06 10:09:18georg.brandlsetmessages: + msg98938
2010-02-06 04:34:59Justin.Lebarsetmessages: + msg98935
2010-02-06 04:30:54ezio.melottisetstatus: open -> closed

nosy: + ezio.melotti
messages: + msg98934

resolution: not a bug
stage: resolved
2010-02-06 04:24:15Justin.Lebarcreate