[issue24959] unittest swallows part of stack trace when raising AssertionError in a TestCase

Robert Collins report at bugs.python.org
Wed Mar 16 14:35:16 EDT 2016


Robert Collins added the comment:

Yes, it is... ish.

The frame skipping code occurs when we serialise exceptions, and we pass a limit in. The limit is calculated on the main exception only. If the cause has a longer exception than the limit we calculated, you'd see this behaviour.

Probably need to make it possible to do per-exception processing of limit: I think via a callback or similar mechanism in traceback (because the cause might have thrown from some code that is also marked __unittest, so if we're honouring that, we should honour it within each exception.

----------
title: unittest swallows par t of stack trace when raising AssertionError in a TestCase -> unittest swallows part of stack trace when raising AssertionError in a TestCase

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24959>
_______________________________________


More information about the Python-bugs-list mailing list