[issue11468] Improve unittest basic example in the doc

2011-07-05 Thread Florian Preinstorfer
Florian Preinstorfer added the comment: I tried to implement the improvements suggested by Ezio Melotti and updated the documentation accordingly. -- keywords: +patch nosy: +notizblock Added file: http://bugs.python.org/file22576/issue-11468.patch _

[issue11468] Improve unittest basic example in the doc

2011-07-17 Thread Senthil Kumaran
Senthil Kumaran added the comment: I would be +1 if the basic example also highlights setUp and tearDown methods. Those are useful ones for a new comer to know via an example snippet and not just with explanation. -- nosy: +orsenthil ___ Python tra

[issue11468] Improve unittest basic example in the doc

2011-07-18 Thread Éric Araujo
Éric Araujo added the comment: I think there’s value in accepting the current patch as really basic example, and then see if the section about setting up and tearing down also has a very simple example. -- ___ Python tracker

[issue11468] Improve unittest basic example in the doc

2011-03-11 Thread Ezio Melotti
New submission from Ezio Melotti : The current example[0] uses assertTrue(element in self.seq) but it would be better to use assertIn instead. The whole example could be changed to something simpler that uses only the assertTrue/assertEqual/assertRaises methods correctly, e.g.: import unitte

[issue11468] Improve unittest basic example in the doc

2011-03-12 Thread Éric Araujo
Éric Araujo added the comment: LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org

[issue11468] Improve unittest basic example in the doc

2011-12-12 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +berkerpeksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.p

[issue11468] Improve unittest basic example in the doc

2011-12-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll be updating this example shortly, but it is intentional that it include only assertEqual, assertTrue, and assertRaises. Those three are the minimum necessary to get up and running (which is the whole point of the BASIC example). -- assignee:

[issue11468] Improve unittest basic example in the doc

2011-12-12 Thread Ezio Melotti
Ezio Melotti added the comment: The patch includes only assertEqual, assertTrue, and assertRaises and, except a s/functions/methods/ in the first line, looks good to me. -- stage: needs patch -> commit review versions: -Python 3.1 ___ Python tracke

[issue11468] Improve unittest basic example in the doc

2011-12-12 Thread Raymond Hettinger
Raymond Hettinger added the comment: Ezio, please leave this one for me. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue11468] Improve unittest basic example in the doc

2012-10-26 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: -berker.peksag ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue11468] Improve unittest basic example in the doc

2012-12-24 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think `self.assertRaises(TypeError, s.split, 2)` looks simpler. In any case two examples for assertRaises needed, simple inlined and more complicated use as context manager. -- nosy: +serhiy.storchaka ___ Python

[issue11468] Improve unittest basic example in the doc

2012-12-24 Thread Ezio Melotti
Ezio Melotti added the comment: Given that this is a basic example, it's not necessary to introduce both the forms of assertRaises. I personally find the context manager form more readable, and I prefer it to the regular one even if it takes two lines instead of one. -- __

[issue11468] Improve unittest basic example in the doc

2013-05-28 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: -serhiy.storchaka stage: commit review -> patch review versions: +Python 3.4 -Python 3.2 ___ Python tracker ___ __