-
- Downloads
Bug 1839263 - Don't derive assertRaisesFromLine from assertRaises....
Bug 1839263 - Don't derive assertRaisesFromLine from assertRaises. r=firefox-build-system-reviewers,ahochheiden, a=test-only DONTBUILD In python 3.11 (maybe also 3.10, I haven't tested that version ; 3.9 was definitely different), by the time the context manager comes back in our assertRaisesFromLine, the traceback is not available anymore (or yet, I'm not entirely sure which way it does) to inspect and check the line numbers we want to check. And while assertRaises exposes the thrown exception in its `exception` attribute, it also resets the traceback associated with it, so we can't find it there either. So instead, we implement our own context manager for assertRaisesFromLine such that we can access that traceback. Differential Revision: https://phabricator.services.mozilla.com/D181425
Loading
Please register or sign in to comment