New style mapscript test
Howard Butler
hobu.inc at GMAIL.COM
Fri Aug 10 12:13:12 EDT 2007
On Aug 10, 2007, at 10:24 AM, Sean Gillies wrote:
> Hi all,
>
> On 1 May, I added Python mapscript tests of loading map objects
> from mapfile strings. Yesterday Howard expressed his concern that
> the doctest style of the new test makes the already uncomfortable
> Python testing framework worse. I disagree.
My concern is that this is the addition of yet another testing method/
framework. Another smaller one is that a doctest that can ingest
text files is only available by default in Python 2.4 and above. I
agree that the doctests are cleaner, but to work with and add to
them, I have to learn the magic of writing python doctests (I do know
how to do that, but not everyone does, and others have been adding to
the Python MapScript tests...).
Port all of the Python MapScript tests to use doctest so we have a
clean, unified framework? If someone steps forward to do that, sign
me up. On the other hand, introduce yet another testing method that
provides partial and different test coverage than the established
existing framework? Don't complain when few bother to run them...
Don't get me wrong, I like doctest's style much better than what we
have now in ./swig/python/tests. I just think that we should go all
or nothing (or go most of the way so there are well-established
patterns of how to do things so people can fill in the rest). We
already have two ways of running and writing MapServer tests. Having
three doesn't improve our situation.
Automated regression testing for MapServer needs a champion (again).
I don't have the time or motivation to rewrite everything into
doctests. I have done my best to keep what we do have running and
relevant (and so have others). If someone comes up with a patch that
rewrites most of the tests in doctest so someone with casual
familiarity can easily write and run the tests, I would gladly
support ditching the current x-unit style ones. Otherwise, I don't
think a single test of new functionality in a new testing framework
that our current testing framework doesn't test goes far enough.
Howard
More information about the mapserver-dev
mailing list