classification
Title: Missing assertion methods in unittest documentation
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.6, Python 3.5, Python 2.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: MLModel, docs@python, ezio.melotti, michael.foord, r.david.murray, rbcollins
Priority: normal Keywords:

Created on 2016-07-13 00:40 by MLModel, last changed 2016-07-13 12:11 by r.david.murray. This issue is now closed.

Messages (4)
msg270278 - (view) Author: Mitchell Model (MLModel) Date: 2016-07-13 00:40
In looking at the source for unittest.TestCase I was very surprised to see quite a few assertion methods that are not included in the module documentation. Every available assertion method should be included in the library documentation. Users should not have to look at the source to see what's available — in fact, why would it even occur to the typical user to do that?

Also, I think the phrase "provides several assert methods to check for and report failures" is an understatement — it provides MANY assert methods.

I think "assertion method" is a better term than "assert method".
msg270282 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-07-13 01:15
If you are looking at the source, you can look at the source.  If you are looking at the documentation, we believe they are all documented.  If you use pydoc/help, they are all documented.

I can't find the phrase you cite, but 'assert methods' is correct: all of the method names start with the word 'assert'.

If there are specific methods you think are *not* in the library reference that you think should be, please give examples.  I suspect they will turn out to be internal helper functions.
msg270289 - (view) Author: Mitchell Model (MLModel) Date: 2016-07-13 02:13
My strong apology. I missed a section of the documentation. It didn't seem possible that they weren't there, but I made a mistake when I checked for them. Sorry.

> On Jul 12, 2016, at 9:15 PM, R. David Murray <report@bugs.python.org> wrote:
> 
> 
> R. David Murray added the comment:
> 
> If you are looking at the source, you can look at the source.  If you are looking at the documentation, we believe they are all documented.  If you use pydoc/help, they are all documented.
> 
> I can't find the phrase you cite, but 'assert methods' is correct: all of the method names start with the word 'assert'.
> 
> If there are specific methods you think are *not* in the library reference that you think should be, please give examples.  I suspect they will turn out to be internal helper functions.
> 
> ----------
> nosy: +r.david.murray
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue27504>
> _______________________________________
msg270305 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2016-07-13 12:11
No problem.  Personally I'd like to see a table of all of them at the top; however, that wasn't the decision that was made in issue 9796 when the tables were added.
History
Date User Action Args
2016-07-13 12:11:57r.david.murraysetmessages: + msg270305
2016-07-13 02:50:12berker.peksagsetstatus: open -> closed
resolution: not a bug
stage: resolved
2016-07-13 02:13:26MLModelsetmessages: + msg270289
2016-07-13 01:15:26r.david.murraysetnosy: + r.david.murray
messages: + msg270282
2016-07-13 00:47:07ned.deilysetnosy: + rbcollins, ezio.melotti, michael.foord

versions: + Python 3.6, - Python 3.2, Python 3.3, Python 3.4
2016-07-13 00:40:20MLModelcreate