catherinedevlin/ipython_doctester — pull request #4 by jhamrick (2014-05-19 23:09:41+00:00)
Title: Add the function to its own globals, so recursive functions work

Currently, recursive functions don't seem to work, because at the time the doctest is run, the function hasn't actually been defined in its own namespace, so the recursive call fails. This pull request adds the function to its own global namespace, so that when it tries to call itself, the call will succeed.