[IPython-dev] Testing ipython with more robustness...

Fernando Perez fperez.net@gmail....
Sun Sep 20 01:18:20 CDT 2009


[ This is mostly for anyone interested in how we'll test IPython in
the future with more robustness, after a very long talk Brian and I
had on Friday...]

I'm fried and need to sleep, and I'll be out all day tomorrow.  But if
you have a chance, have a look at this.

Put it somewhere in your pythonpath (I symlinked it) and try

nosetests -vvs ptest --with-doctest

there's a deliberately broken test, you can then study it with

nosetests -vvs ptest --with-doctest --pdb-failures

The fix is trivial, at the end of test.py change

    x, y = 2, 2
    x, y = 1, 2

The point is:

- these are real parametric tests
- they use normal unittest (try python test.py in the test/ directory)
- they work with nose (after I monkeypatched it, I reported the bug to nose)

- they can be debugged interactively!!!

- the ipython docstrings decorators are also there
- there's also a decorator to make a normal unittest out of any
function, nose-like but without depending on nose always (they also
work with nose).

I think we've cracked it.

I don't have time to clean it for commit tonight, but I wanted you to
have this right away.

It's been a hard but productive 2 days, though doing this meant I
didn't finish the 'language spec'.

I'm just too concerned with testing.

Let me know what you think...


-------------- next part --------------
A non-text attachment was scrubbed...
Name: ptest.tgz
Type: application/x-gzip
Size: 4223 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/ipython-dev/attachments/20090919/3f28036e/attachment.tgz 

More information about the IPython-dev mailing list