Author ezio.melotti
Recipients eric.araujo, ezio.melotti, michael.foord, rhettinger
Date 2010-11-01.13:21:45
SpamBayes Score 2.48565e-06
Marked as misclassified No
Message-id <1288617710.03.0.407109661236.issue9796@psf.upfronthosting.co.za>
In-reply-to
Content
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*);
History
Date User Action Args
2010-11-01 13:21:50ezio.melottisetrecipients: + ezio.melotti, rhettinger, eric.araujo, michael.foord
2010-11-01 13:21:50ezio.melottisetmessageid: <1288617710.03.0.407109661236.issue9796@psf.upfronthosting.co.za>
2010-11-01 13:21:47ezio.melottilinkissue9796 messages
2010-11-01 13:21:46ezio.melotticreate