Ezio Melotti <ezio.melo...@gmail.com> added the comment:

The attached patch adds a table with the most common assert* methods and their 
explanation at the top of the doc.

There are however a few things that should imho be changed, but that will 
require some re-organization in the unittest doc:

1) now the table is on the third "screen" and it's necessary to scroll down to 
reach it. It would be better to move it in an higher position or add a link at 
the top of the doc to the assert* methods section with the tables;
2) all the assert methods should be in a table. More tables can be used, e.g.:
  * one with the common methods (the ones in the patch);
  * one with other "comparison" methods like assertLess and friends, 
assert[Not]AlmostEqual (these could be included in the first table though);
  * one for exceptions and warnings (assertRaises, assertWarn, 
assertRaisesRegexp, ...);
  * one for "advanced" methods (assertItemsEqual, assertDictContainsSubset, 
assertSequenceEqual, ...);
  * one for the type-specific methods used by assertEqual (assertSetEqual, 
assertListEqual, ...), saying that they are used automatically by assertEqual 
and possibly that they shouldn't be used directly.
3) the doc of the methods should be right after the table that lists them;
4) other non-assert methods shouldn't be mixed with the assert* methods -- the 
assert* methods should have their own section;
5) other methods could be grouped in tables too (setUp, tearDown, ...; skip*);

----------
keywords: +patch
type:  -> feature request
Added file: http://bugs.python.org/file19454/issue9796.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9796>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to