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 or I'll close this unless there are any objections. |
|
|
msg111732 - (view) |
Author: Éric Araujo (eric.araujo) *  |
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) *  |
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. |
|
|
msg180740 - (view) |
Author: Ezio Melotti (ezio.melotti) *  |
Date: 2013-01-27 03:45 |
Michael, what's the situation now? |
|
|
msg181857 - (view) |
Author: Michael Foord (michael.foord) *  |
Date: 2013-02-10 21:41 |
I'm pretty sure the proposed patch doesn't work - but there's no test for it so I can't be sure. I can't think of a better basic strategy, but the strategy here is horrible. This means I'm sympathetic to the desire for a removeTest method but not very enthusiastic about implementing it (and certainly not this implementation I'm afraid). |
|
|
msg181858 - (view) |
Author: Michael Foord (michael.foord) *  |
Date: 2013-02-10 21:42 |
I think better filtering at the collection phase - collecting tests by name or filtering out tests by name - could obviate the need for this. |
|
|
msg406525 - (view) |
Author: Irit Katriel (iritkatriel) *  |
Date: 2021-11-18 09:31 |
I agree with Michael that it’s better not to include the test in the first place. This issue was abandoned 8 years ago, closing now. |
|
|