<p dir="ltr">Yeah i didn't enable any replacements by default, though tracebacks are stripped, as they are easy to find in the comms. There are examples in the tests, but i probably need to document those main edge cases better.</p>
<div class="gmail_quote">On Feb 14, 2015 7:28 PM, "Thomas Kluyver" <<a href="mailto:takowl@gmail.com">takowl@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Thanks for this, Nicholas - there has been quite a bit of discussion about having something like doctest for notebooks, so it's great to see an implementation.<br><br></div>I imagine the tricky bit will be deciding which bits of output are changeable and should be ignored. I think doctest recognises three things that are allowed to vary:<br><br></div>- <foo at 0x4fce2...> reprs<br></div><div>- Python tracebacks<br></div><div>- ... ellipsis to explicitly mark variable sections (this might need an extra option enabled, I forget)<br><br></div><div>Best wishes,<br>Thomas<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 14 February 2015 at 14:55, Nicholas Bollweg <span dir="ltr"><<a href="mailto:nick.bollweg@gmail.com" target="_blank">nick.bollweg@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Just wanted to plug a little nose extension that I've just gotten working:<br><br><a href="https://github.com/bollwyvl/nosebook" target="_blank">https://github.com/bollwyvl/nosebook</a><br><br>nosebook finds notebooks that look like tests, and for each notebook, 
starts a kernel, runs the code cells and compares the output to what was
 in the original notebook. It can be configured to find different 
notebooks, as well as strip out nasty <xyz at 0x1234> bits.<br><br></div><div>It's not a full nose/notebook integration, as it lacks lots of features like setup and teardown, but should make it easier to keep documentation in notebooks fresh with respect to code changes.<br></div><div><br></div><div>It reuses IPython.kernel.tests.util, which is probably not the best long-term solution, as that probably isn't meant as a public API, but it was the quickest way to get it up and running. Right now it's not backward compatible with IPython 2.x, but that might be added if there is outcry.<br></div><div><br></div><div>Interested in feedback!<br></div></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org" target="_blank">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
IPython-dev mailing list<br>
<a href="mailto:IPython-dev@scipy.org">IPython-dev@scipy.org</a><br>
<a href="http://mail.scipy.org/mailman/listinfo/ipython-dev" target="_blank">http://mail.scipy.org/mailman/listinfo/ipython-dev</a><br>
<br></blockquote></div>