[IPython-User] Doctest checker in IPython notebook

Brian Granger ellisonbg@gmail....
Thu Oct 11 11:40:44 CDT 2012


Hi, this looks really great!  We would love to work with you to make
this an actual IPython library or extension.  If you are interested in
working with us, let's use this thread to discuss where you see this
heading and the best way to incorporate it into the project.  Of
course, feel free to continue to work on this on your own as well.



On Thu, Oct 11, 2012 at 8:34 AM, Thomas Kluyver <takowl@gmail.com> wrote:
> I spotted this on Planet Python. Catherine Devlin (CCed) has made a
> tool to doctest a function and display the results in a nice HTML
> format, for use with the notebook:
> http://catherinedevlin.blogspot.co.uk/2012/10/im-increasingly-amazed-at-ipython.html
> In the discussion recently about teaching with the notebook, we
> mentioned the possibility of homework notebooks where the student has
> to fill in code, so something like this could be really useful.
> I wonder if there's a better way than using doctests, though (doctests
> being my pet hate)? It would be easy to define a list of input/output
> pairs, but all the tuples involved would make writing the tests
> awkward. Maybe a cell magic:
> %%check_cases
> cube(3) == 27
> cube(-2) == -8
> Thomas
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user

Brian E. Granger
Cal Poly State University, San Luis Obispo
bgranger@calpoly.edu and ellisonbg@gmail.com

More information about the IPython-User mailing list