Thomas Hunger | 1 Oct 2007 11:38
Picon
Favicon

Re: Test suite?

> One way to do it would be doctests, i.e. write a .pyx module with a

I believe doctest is used to check if examples in the docs still work, 
not really as a unit-test suite.

> In any case, we need something portable here. I know that Greg has
> a test suite for Pyrex, but besides the functionality, it actually
> compares the generated source with an expected source file. That
> makes it possible to also check for things like GIL handling or
> increfs, but I think we shouldn't check the source, as it is highly
> likely to change considerably if Cython changes slightly. But we

I agree. Maybe we could do something like:

1) compile all pyx-modules in the test directory (via ./setup build)
2) Test the modules via doctest, unittest or any other of the many
   unit test frameworks. 

The "import unittest" distributed with every python is not great, but 
it does the job. But I really don't mind what we choose.

> http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/Pyrex-Test
>s-0.9.5.1.tar.gz

Thanks for the pointer. We could definitly use the pyx-source for 
tests.

Tom

Gmane