This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2010年09月14日 21:45 by pitrou, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| python3k.skipteardown.patch | MarkRoddy, 2010年11月07日 00:37 | Patch against the py3k branch to add support for handling SkipTest from the tearDown method | review | |
| python27.skipteardown.patch | MarkRoddy, 2010年11月07日 00:39 | Patch against the release27-maint branch to add support for handling SkipTest from the tearDown method | review | |
| Messages (6) | |||
|---|---|---|---|
| msg116422 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2010年09月14日 21:45 | |
Raising SkipTest when in a tearDown method is reported as an error, rather than a skipped test. Now doing this sounds like a weird use case, but it would be actually useful when you have a worker thread, and the tearDown method collects the exception raised in that thread and raises it again. For the worker thread to be able to use skipTest(), a SkipTest exception raised in tearDown should be properly reported as a skip. |
|||
| msg116441 - (view) | Author: Michael Foord (michael.foord) * (Python committer) | Date: 2010年09月15日 09:52 | |
Interesting use case. If the test has not yet failed this is fine. The problem is that if an exception has *already* been raised then it will already have been added to the result - so by then skipping is meaningless (or contradictory - the test can fail *and* skip). |
|||
| msg120654 - (view) | Author: Mark Roddy (MarkRoddy) * | Date: 2010年11月07日 00:37 | |
Attaching patch which adds support for registering a skip when raised from tearDown. Per Michael's point regarding failed tests, this is only handled if the test has been successful when SkipTest is raised from tearDown. |
|||
| msg120655 - (view) | Author: Mark Roddy (MarkRoddy) * | Date: 2010年11月07日 00:39 | |
Attaching patch which does the same as the previous for the release27-maint branch. |
|||
| msg124329 - (view) | Author: Michael Foord (michael.foord) * (Python committer) | Date: 2010年12月19日 03:24 | |
Committed revision 87390. It is a stretch to see this as a bugfix rather than a new feature so probably *shouldn't* be backported to 2.7. On the other hand the fix is combined with the fix for issue 9857 which *is* a bugfix and *should* be backported to Python 2.7. |
|||
| msg124330 - (view) | Author: Michael Foord (michael.foord) * (Python committer) | Date: 2010年12月19日 03:25 | |
Correction, the fix is combined with the fix for issue 10611. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:06 | admin | set | github: 54066 |
| 2010年12月19日 03:25:05 | michael.foord | set | nosy:
pitrou, draghuram, ezio.melotti, michael.foord, MarkRoddy messages: + msg124330 |
| 2010年12月19日 03:24:16 | michael.foord | set | status: open -> closed nosy: pitrou, draghuram, ezio.melotti, michael.foord, MarkRoddy messages: + msg124329 resolution: fixed stage: resolved |
| 2010年11月09日 10:45:26 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2010年11月07日 00:39:46 | MarkRoddy | set | files:
+ python27.skipteardown.patch messages: + msg120655 |
| 2010年11月07日 00:37:31 | MarkRoddy | set | files:
+ python3k.skipteardown.patch nosy: + MarkRoddy messages: + msg120654 keywords: + patch |
| 2010年09月15日 13:54:46 | draghuram | set | nosy:
+ draghuram |
| 2010年09月15日 09:52:15 | michael.foord | set | messages: + msg116441 |
| 2010年09月14日 21:45:16 | pitrou | create | |