classification
Title: Expect methods for testing.
Type: enhancement Stage: patch review
Components: Library (Lib) Versions: Python 3.1, Python 2.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, michael.foord, pitrou, pupeno
Priority: normal Keywords: patch

Created on 2008-08-20 08:49 by pupeno, last changed 2010-07-20 10:59 by michael.foord. This issue is now closed.

Files
File name Uploaded Description Edit
expect.diff pupeno, 2008-08-20 08:49
Messages (4)
msg71518 - (view) Author: J. Pablo Fernández (pupeno) Date: 2008-08-20 08:49
I'm attaching a patch that adds expect methods to TestCase. They are
like fail methods, but they don't fail immediately. They are useful when
you want to catch more than one error at a time.
I included some tests.
There are docstrings but more documentation might be needed. I'll gladly
write it if/when the code is good to go.
The original code was written by Donovan Baarda for an internal project
at Google, I only extracted the bits that made sense to publish and
changed the style to me more Python-alike.
msg71529 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2008-08-20 09:53
Interesting, but it should be discussed on the mailing-list first.
Also, since this is a new feature, it must be retargeted to 2.7/3.1.
msg110683 - (view) Author: Mark Lawrence (BreamoreBoy) * Date: 2010-07-18 20:27
Can't see this going anywhere, might as well close unless someone is really interested.
msg110882 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-07-20 10:59
The API on TestCase is already too wide without adding more methods. This is easy enough to do in a TestCase subclass for those who want it.
History
Date User Action Args
2010-07-20 10:59:29michael.foordsetstatus: pending -> closed
resolution: wont fix
messages: + msg110882
2010-07-18 20:27:51BreamoreBoysetstatus: open -> pending
nosy: + BreamoreBoy
messages: + msg110683

2009-04-26 01:35:24ajaksu2setnosy: + michael.foord

stage: patch review
2008-08-20 09:53:59pitrousetpriority: normal
type: enhancement
messages: + msg71529
nosy: + pitrou
versions: + Python 3.1, Python 2.7, - Python 3.0
2008-08-20 08:49:12pupenocreate