You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Ignore objects that inspect.unwrap throws due to
too many wrappers. This is a very rare case, however
it can easily be surfaced when a module under doctest
imports unitest.mock.call into its namespace.
This commit adds the fix to the module.
We simply skip any object that throws this exception.
This should handle the majority of cases.
Future thoughts:
1. Should catching this be optional defaulting to true,
but allowing for folks to rethrow the exception to insist
on truly clean code?
2. Should we break out _find() into more sub functions sp
that we can more easily derive our own versions for each
sub function that _find does making it easier to fix
future issues?
3. Should we include a way to denylist by `id` some
objects so that future objects that cause problems
with doctest can be passed in to ignore?
Test Plan:
Reviewers:
0 commit comments