[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Eric V. Smith


Change by Eric V. Smith :


--
resolution:  -> wont fix

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Ram Rachum


Ram Rachum  added the comment:

I disagree but I guess I'm in the minority here, so I'll close this issue.

--
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I concur with Eric that the current presentation is reasonable and better than 
adding boilerplate to every entry.  It suffices that the docs cover the *msg* 
argument once and that each entry includes *msg* in its signature.  

Elsewhere in the docs we also try to avoid unnecessary repetition (for example, 
most classes don't list all their dunder methods).  Excess repetition in the 
docs impairs readability.  The unittest docs are already so long that it 
discourages someone from reading it top to bottom.

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Ram Rachum


Ram Rachum  added the comment:

I'd include that same message you quoted, minus the list of functions, on each 
and every one of the functions that have this argument.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

Suggestions to improve it are welcomed. I can't think of a way to do it without 
cluttering things up.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Ram Rachum


Ram Rachum  added the comment:

Thanks, but people looking at a specific function might not guess that the 
documentation for one of its arguments is hiding somewhere on the long page. 
This is especially relevant with a confusing argument like `msg`, since it's 
tempting to think that this would be the message of the expected exception.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Eric V. Smith


Eric V. Smith  added the comment:

The documentation at https://docs.python.org/3/library/unittest.html says "All 
the assert methods accept a msg argument that, if specified, is used as the 
error message on failure (see also longMessage). Note that the msg keyword 
argument can be passed to assertRaises(), assertRaisesRegex(), assertWarns(), 
assertWarnsRegex() only when they are used as a context manager."

--
nosy: +eric.smith

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Alex Waygood


Change by Alex Waygood :


--
versions:  -Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46081] Document the msg argument for assertRaises

2021-12-15 Thread Ram Rachum


New submission from Ram Rachum :

The `msg` argument to the `assertRaises` function isn't documented. The 
documentation should say what this argument does.

--
assignee: docs@python
components: Documentation
messages: 408587
nosy: cool-RR, docs@python
priority: normal
severity: normal
status: open
title: Document the msg argument for assertRaises
versions: Python 3.10, Python 3.11, Python 3.6, Python 3.7, Python 3.8, Python 
3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com