зеркало из https://github.com/mozilla/gecko-dev.git
84236733a9
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 |
||
---|---|---|
.. | ||
docs | ||
gdbpp/gdbpp | ||
l10n | ||
lldbutils | ||
mach | ||
mozboot | ||
mozbuild | ||
mozlint | ||
mozperftest | ||
mozrelease | ||
mozterm | ||
mozversioncontrol | ||
sites | ||
README | ||
mach_commands.py | ||
moz.build |
README
This directory contains common Python code. The basic rule is that if Python code is cross-module (that's "module" in the Mozilla meaning - as in "module ownership") and is MPL-compatible, it should go here. What should not go here: * Vendored python modules (use third_party/python instead) * Python that is not MPL-compatible (see other-licenses/) * Python that has good reason to remain close to its "owning" (Mozilla) module (e.g. it is only being consumed from there). Historical information can be found at https://bugzilla.mozilla.org/show_bug.cgi?id=775243 https://bugzilla.mozilla.org/show_bug.cgi?id=1346025