After some practical usage, I found the design of the before, after and around hooks to be a little counter-intuitive.
def before in a shared context can clobber existing before hooks.
before and after hooks are all run from bottom to top, and thenaround hooks. This leads to odd interleaving of hooks, in other words, an around hook is not equivalent to before and after hooks.
We introduce a better model for before and after hooks, and a better model for including shared contexts.
After some practical usage, I found the design of the before, after and around hooks to be a little counter-intuitive.
def before
in a shared context can clobber existing before hooks.before
andafter
hooks are all run from bottom to top, and thenaround
hooks. This leads to odd interleaving of hooks, in other words, anaround
hook is not equivalent tobefore
andafter
hooks.We introduce a better model for before and after hooks, and a better model for including shared contexts.