[IPython-dev] Unit testing
Wed Sep 17 13:21:29 CDT 2008
Fernando knows much better about how nose finds tests, but I think in
this case I know what the issue is. Nose only looks for tests in
modules names *test*.py. We are putting such files in locations like
Broadly speaking, any package should have a tests sub-directory that
has test modules for each module in the package:
If you then go put your unittests or nose tests in test_foo.py or
test_bar.py nose should pick them up automatically.
The tests for the ipy_profile_sh.py module would probably go into
Does that help? Fernando, any other wisdom as to how nose finds tests?
We need to update our Sphinx developer docs about this.
On Wed, Sep 17, 2008 at 10:01 AM, Ville M. Vainio <firstname.lastname@example.org> wrote:
> Since it appears we will be using nose to run the unit test, and since
> IPython "classic" has zero tests that are run by the current test
> suite (from what I gathered from running ./iptest), where can I get
> started on writing such tests?
> I tried adding this to ipy_profile_sh.py:
> def test():
> assert False
> And, it wasn't run by nose. So, where should we get started? Create
> 'test' directories?
> Ville M. Vainio
> IPython-dev mailing list
More information about the IPython-dev