Use the function's globals in the doctest runner