| 
      
      
      From: Andreas J. <an...@an...> - 2002-11-14 19:14:54
       | 
| 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 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())
- the test reside currently outside the docutils package instead
  inside the package (as most Zope packages do).
Zophistas love unittests and it would be a shame to leave them out.
Any ideas?
Andreas
    ---------------------------------------------------------------------
   -    Andreas Jung                     http://www.andreas-jung.com   -
  -   EMail: andreas at andreas-jung.com                              -
   -            "Life is too short to (re)write parsers"               -
    ---------------------------------------------------------------------
 | 
| 
      
      
      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/ | 
| 
      
      
      From: Richard J. <rj...@ek...> - 2002-11-15 06:12:05
       | 
| On Fri, 15 Nov 2002 6:14 am, Andreas Jung wrote: > - the test reside currently outside the docutils package instead > inside the package (as most Zope packages do). Is this an absolute necessity? It seems odd to install unit tests, especially since they'll probably never be run... I only ask becuase I do the same thing with my projects. Richard | 
| 
      
      
      From: Andreas J. <an...@an...> - 2002-11-15 05:27:19
       | 
| there are testrunners working all night to run all unittest
for the different versions. I don't know why they should never be
run?
-aj
--On Freitag, 15. November 2002 09:02 +1100 Richard Jones 
<rj...@ek...> wrote:
> On Fri, 15 Nov 2002 6:14 am, Andreas Jung wrote:
>> - the test reside currently outside the docutils package instead
>>   inside the package (as most Zope packages do).
>
> Is this an absolute necessity? It seems odd to install unit tests,
> especially  since they'll probably never be run...
>
> I only ask becuase I do the same thing with my projects.
>
>
>    Richard
    ---------------------------------------------------------------------
   -    Andreas Jung                     http://www.andreas-jung.com   -
  -   EMail: andreas at andreas-jung.com                              -
   -            "Life is too short to (re)write parsers"               -
    ---------------------------------------------------------------------
 | 
| 
      
      
      From: Richard J. <rj...@ek...> - 2002-11-15 09:03:24
       | 
| On Fri, 15 Nov 2002 4:27 pm, Andreas Jung wrote:
> --On Freitag, 15. November 2002 09:02 +1100 Richard Jones
> <rj...@ek...> wrote:
> > On Fri, 15 Nov 2002 6:14 am, Andreas Jung wrote:
> >> - the test reside currently outside the docutils package instead
> >>   inside the package (as most Zope packages do).
> >
> > Is this an absolute necessity? It seems odd to install unit tests,
> > especially  since they'll probably never be run...
> >
> > I only ask becuase I do the same thing with my projects.
> >
> there are testrunners working all night to run all unittest
> for the different versions. I don't know why they should never be
> run?
Yes, but do the testrunners have to run the tests from the python std library? 
And surely users will rarely run unit tests every night?
    Richard
 |