plone/plone.testing — comment on commit 2254545a37f03da23eefdc9c4f9c5771752750f6
File:  line 0
By davisagli:

Well, the fact that Python's default mutable kwargs aren't cleared between calls is actually a feature that get_module_info is trying to take advantage of for performance reasons. Having plone.testing remember the func_defaults of get_module_info and then restore them later won't work when get_module_info has been patched, because it remembers/restores the defaults of the wrapper, not of the original function.

I guess maybe what we need is some convention for storing the original function under a reliable name in the module so that plone.testing can find it.