classification
Title: removeTest() method patch for unittest.TestSuite
Type: enhancement Stage:
Components: Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, edgimar, eric.araujo, michael.foord
Priority: normal Keywords: patch

Created on 2007-08-21 09:14 by edgimar, last changed 2010-07-27 22:30 by michael.foord.

Files
File name Uploaded Description Edit
unittest_removetest.patch edgimar, 2007-08-21 09:14 patch to add removeTest method to TestSuite
Messages (5)
msg53044 - (view) Author: Mark Edgington (edgimar) Date: 2007-08-21 09:14
This is a simple patch to add a "removeTest" method to the unittest.TestSuite object.  It is called in exactly the same way the "addTest" method is called, except that it removes the provided TestCase from the suite.

This is useful if you want to add a bunch of unittests via TestLoader().loadTestsFromModule(), EXCEPT for a few specific cases, which you would like to subsequently remove.
msg108206 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-06-19 19:00
This is almost three years old but strikes me as being useful.  Could somebody with more knowledge than myself review the patch and update the relevant Python versions?  Failing that, simply close the issue as not being relevant today.
msg111726 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-07-27 20:35
As nobody has responded to msg53044 or msg108206 I'll close this unless there are any objections.
msg111732 - (view) Author: Éric Araujo (eric.araujo) * (Python committer) Date: 2010-07-27 21:01
Michael, can you say if the feature request is accepted or rejected?
msg111740 - (view) Author: Michael Foord (michael.foord) * (Python committer) Date: 2010-07-27 22:30
I'm sympathetic to the feature request. I think that the way tests identify themselves will change (improve) to accommodate the new extension machinery. I would like to leave this feature request open for the moment and revisit it again once the extension machinery is in place.
History
Date User Action Args
2010-07-27 22:30:14michael.foordsetmessages: + msg111740
2010-07-27 21:01:15eric.araujosetstatus: pending -> open
versions: + Python 3.2, - Python 3.1, Python 2.7
nosy: + eric.araujo

messages: + msg111732

stage: test needed ->
2010-07-27 20:35:01BreamoreBoysetstatus: open -> pending

messages: + msg111726
2010-06-19 19:00:38BreamoreBoysetnosy: + BreamoreBoy
messages: + msg108206
2009-04-06 10:58:12ajaksu2setnosy: + michael.foord
versions: + Python 3.1, Python 2.7, - Python 2.5

type: enhancement
stage: test needed
2007-08-21 09:14:46edgimarcreate