1) What's the best way to integrate my unit tests for auto-running? I'd
like something to the effect of
for file in */Tests/*.py */*/Tests/*.py ...:
do Python import of module corresponding to file
call unittest to extract testcases and append to suite
Surely there must be some utilities for doing this? But I didn't find
anything. (If not I can write it up of course; I suppose I'll run them
by default but add a flag for not running them).
2) Robert recently pointed out a bug in my code which was only present
when Options.embed_pos_in_docstring was set to 1. Therefore, runtests.py
did not catch it.
Inserting:
if WITH_CYTHON:
...
+ import Cython.Compiler.Options
+ Cython.Compiler.Options.embed_pos_in_docstring = 1
in runtests.py did allow me to work out the bug, however this did of
course make all the docstring testcases fail.
(If there's already code present to deal with testing this then just
inform me about it and stop reading.)
So what I'm thinking is that there should be some kind of mechanism for
allowing integration tests to specify their compilation options.
Something like:
mytest.options:
embed_pos_in_docstring = 1
Or perhaps better/more stable:
mytest.options:
--embed-positions
Any thoughts? (Of course, any implementation burden would fall on me,
the implementor.)
(The latter would, to make it clean, require a refactoring of CmdLine.py
to seperate command line argument parsing from command line argument
"execution". But CmdLine.py should probably be using optparse anyway,
and that gives such a seperation for free and one could simply pull the
OptionParser into runtests.py for parsing the options-file.)
--
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev