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 2012年09月09日 19:08 by Julian, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (4) | |||
|---|---|---|---|
| msg170126 - (view) | Author: Julian Berman (Julian) * | Date: 2012年09月09日 19:08 | |
Can `__unittest = True`, which is used to hide stack frames from tracebacks inside the testing framework, be documented as being public, or, if that's not acceptable, be replaced by something that is? `_exc_info_to_string` is a hairy function to need to rewrite when authoring a testing framework, but it's a rather common thing to want, and would be nice if it was easily done by integrating with what `TestCase` is already doing. It's also (with or without formal blessing) being used in the wild in at least one place I know of here http://bazaar.launchpad.net/~testtools-committers/testtools/trunk/view/head:/testtools/testcase.py#L798 and since it's not terribly critical and will fail rather nicely even if the API changes suddenly I'd bet other places are using it too, though I haven't bothered to check. See also http://twistedmatrix.com/trac/ticket/4127 which would be easier to implement if this were acceptable to use for external code. |
|||
| msg170128 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年09月09日 19:36 | |
This is a duplicate of issue 1705520. Since Michael obviously hasn't gotten to it yet, a proposed patch might move things along. |
|||
| msg170129 - (view) | Author: Michael Foord (michael.foord) * (Python committer) | Date: 2012年09月09日 19:36 | |
Whatever we do must be backwards compatible. The question is, is a better api that doesn't use stack frames (which is a hack in my opinion) even possible? |
|||
| msg170191 - (view) | Author: Eric Snow (eric.snow) * (Python committer) | Date: 2012年09月10日 14:32 | |
yeah, I keep thinking we need a better API for managing tracebacks. One of these days... |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:35 | admin | set | github: 60095 |
| 2012年09月10日 14:32:45 | eric.snow | set | nosy:
+ eric.snow messages: + msg170191 |
| 2012年09月09日 19:36:24 | michael.foord | set | messages: + msg170129 |
| 2012年09月09日 19:36:08 | r.david.murray | set | status: open -> closed nosy: + r.david.murray messages: + msg170128 superseder: API for excluding methods from unittest stack traces stage: resolved |
| 2012年09月09日 19:08:04 | Julian | create | |