Thanks, everybody! After a bunch of tweaking to get it to work as a decorator, I uploaded to PyPI:<div><br></div><div><a href="http://pypi.python.org/pypi/ipython_doctester">http://pypi.python.org/pypi/ipython_doctester</a></div>
<div><br></div><div>I'd be happy to work toward inclusion in IPython itself, of course! - and I'm open to suggestions about what else should be done to make that possible. I do want to let it take an argument so that you can decorate with @test(show_successes=True) to get each successful example reported even in an overall test success, or @test(show_successes=false) to never say anything about tests that succeed (like doctest itself). But my first pass at implementing that failed, and I wanted to get this out there.</div>
<div><br></div><div>I plan to keep ipython_doctester as a separate project in addition to possible future IPython inclusion, because I do want a version that automatically uploads each test result to an instructor's dashboard... and that's clearly outside the scope of IPython itself.<br>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Oct 11, 2012 at 12:40 PM, Brian Granger <span dir="ltr"><<a href="mailto:ellisonbg@gmail.com" target="_blank">ellisonbg@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Catherine,<br>
<br>
Hi, this looks really great! We would love to work with you to make<br>
this an actual IPython library or extension. If you are interested in<br>
working with us, let's use this thread to discuss where you see this<br>
heading and the best way to incorporate it into the project. Of<br>
course, feel free to continue to work on this on your own as well.<br>
<br>
Cheers,<br>
<br>
Brian<br>
<div><div class="h5"><br>
On Thu, Oct 11, 2012 at 8:34 AM, Thomas Kluyver <<a href="mailto:takowl@gmail.com">takowl@gmail.com</a>> wrote:<br>
> I spotted this on Planet Python. Catherine Devlin (CCed) has made a<br>
> tool to doctest a function and display the results in a nice HTML<br>
> format, for use with the notebook:<br>
><br>
> <a href="http://catherinedevlin.blogspot.co.uk/2012/10/im-increasingly-amazed-at-ipython.html" target="_blank">http://catherinedevlin.blogspot.co.uk/2012/10/im-increasingly-amazed-at-ipython.html</a><br>
><br>
> In the discussion recently about teaching with the notebook, we<br>
> mentioned the possibility of homework notebooks where the student has<br>
> to fill in code, so something like this could be really useful.<br>
><br>
> I wonder if there's a better way than using doctests, though (doctests<br>
> being my pet hate)? It would be easy to define a list of input/output<br>
> pairs, but all the tuples involved would make writing the tests<br>
> awkward. Maybe a cell magic:<br>
><br>
> %%check_cases<br>
> cube(3) == 27<br>
> cube(-2) == -8<br>
><br>
> Thomas<br>
</div></div>> _______________________________________________<br>
> IPython-User mailing list<br>
> <a href="mailto:IPython-User@scipy.org">IPython-User@scipy.org</a><br>
> <a href="http://mail.scipy.org/mailman/listinfo/ipython-user" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-user</a><br>
<span class=""><font color="#888888"><br>
<br>
<br>
--<br>
Brian E. Granger<br>
Cal Poly State University, San Luis Obispo<br>
<a href="mailto:bgranger@calpoly.edu">bgranger@calpoly.edu</a> and <a href="mailto:ellisonbg@gmail.com">ellisonbg@gmail.com</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>- Catherine<br><a href="http://catherinedevlin.blogspot.com" target="_blank">http://catherinedevlin.blogspot.com</a><br><br>
</div></div>