[IPython-dev] Unit testing
Ville M. Vainio
vivainio at gmail.com
Wed Sep 17 14:52:00 EDT 2008
On Wed, Sep 17, 2008 at 9:21 PM, Brian Granger <ellisonbg.net at gmail.com> wrote:
> If you then go put your unittests or nose tests in test_foo.py or
> test_bar.py nose should pick them up automatically.
Actually, it seems ipython/IPython/tests is the best place.
Something that's cool: a test like this will work:
def test_rehashx():
_ip.IP.alias_table.clear()
_ip.magic('rehashx')
assert len(_ip.IP.alias_table) > 10
That is, I don't need to set up _ip myself because the stuff gets
evaluated in an existing ipython session.
Is there a way I can make nose skip all the tests I don't care about
(i.e. the ones I'm NOT developing at the moment)? Waiting for 9 secs
every time I try it feels unnecessary. I could create a proper
setup/teardown fixture, but my guess is that it isn't really needed...
--
Ville M. Vainio
http://tinyurl.com/vainio
More information about the IPython-dev
mailing list