|
From: David G. <go...@py...> - 2002-11-15 05:57:58
|
Andreas Jung wrote: > I am currently thinking about checking the docutils tests into > the zope core but I have currently three problems with that: > > - not all tests pass (latest docutils checkout) The addition of the test_language.py module has pointed out some deficiencies. Missing are a French translation of directive names (I have a promise of a module) and some Swedish directive translations. I hope they'll be added soon and then all tests will pass again. > - the tests do not support Zope testrunner (a script that searches > for test*.py files containing test_suite() method that return > an instance of unittest.makeSuite()) There's no standard (that I know of) for directories of unit tests. Everybody makes up their own, so it's no surprise that we don't follow the same standard! I think ours works well and would make a good addition to the standard unittest.py. (Zope's may be just as good or better; I wouldn't know.) Each of the Docutils test modules either * contains multiple unittest.TestCase subclasses (modules directly in docutils/test), or * has a "suite" function that returns an instance of unittest.TestSuite (modules in subdirectories of docutils/test). It would be easy enough to add ``test_suite = suite`` to each of the latter group of test modules, if that works for Zope. I don't know what to do about the former group though. Please note that the docutils/test/DocutilsTestSupport.py module is used by all of the test modules. The subdirectories are in fact packages, with __init__.py files which help individual test modules to find and import the DocutilsTestSupport module (which in turn imports package_unittest.py). > - the test reside currently outside the docutils package instead > inside the package (as most Zope packages do). Docutils is installed using Distutils (setup.py), and I don't see the point in copying test modules to Python's site-packages directory. The test code takes up a lot of disk space, more than the Docutils code itself. But you're welcome to copy the test directory in for Zope. -- David Goodger <go...@py...> Open-source projects: - Python Docutils: http://docutils.sourceforge.net/ (includes reStructuredText: http://docutils.sf.net/rst.html) - The Go Tools Project: http://gotools.sourceforge.net/ |