Hi,

Dag Sverre Seljebotn wrote:
> NumPy has recently switched to using nosetest for their testing framework:
> 
> http://www.somethingaboutorange.com/mrl/projects/nose/

That looks like a pretty huge package just for testing. The API docs count
almost 20 modules. And it's even more when you consider that most of the
compiler code doesn't use unit tests at all but only (easy-to-write)
end-to-end tests.

Don't get me wrong, this dependency won't hurt users much and I don't mind
installing a new package as a committed developer. But integrators,
distribution maintainers and single-patch contributors may also suffer from
that dependency. Currently, Cython is self-contained even for developers. It's
easier to tell people "run runtests.py in the root directory" than "install
nose-test on your machine (which you can find /here/) and then use the
following command line to run it".


> - The ability to make simple functions etc. test cases if they have the
> right name. Though unittest classes are of course supported as well.

I consider that a rare requirement. Most unit tests will need some kind of
infrastructure and helper functions/classes anyway (especially for a compiler
setting, I'd say), so you'd most likely end up with one or more custom unit
test base class anyway.


> - One can write multiple tests in one function, then "yield" each one of
> them, and each will be a seperate test case in the reports.

Might be nice syntactic sugar, but that's not hard to do at all. I don't mind
writing those 5 lines of Python code by hand if I really need that feature.


> I just wouldn't like to have rewrite discovery of unittests in runtests.py
> when this is already there in nosetests.

That's already done by the one-module test tool I pointed you to, which you
can just add to Cython's root directory. It may not be the best one, but there
are definitely other one-module test runner scripts out there which may fit
our needs without adding our first non-functional dependency.


> What do you think -- will it be bad to have this as a dependency?

I'm -0.5 on this, as I likely won't be affected too much anyway. I just
dislike the non-trivial dependency.

Stefan

_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to