[Zope3-dev] Re: super-mini proposal for doctestunit.py

Garrett Smith garrett at mojave-corp.com
Mon May 10 09:42:23 EDT 2004


Jim Fulton wrote:

> Garrett Smith wrote:
> 
>> We're making extensive use of doctests and have copied and pasted the 
>> code from zope/testing/doctestunit.py because it's unusable outside 
>> its package.
> 
> 
> 
> 
>> I'd like to make the following change, which opens up the function for 
>> general use:
>>
>> 90c90,98
>> < def DocFileSuite(*paths):
>> ---
>>  > def DocFileSuite(package, *paths):
>>  >     """Creates a suite of doctest files.
>>  >
>>  >     package is the source package containing the doctest files.
>>  >
>>  >     Each subsequent argument is a string specifying the file name 
>> of the
>>  >     doctest relative to the package.
>>  >     """
>>  >
>> 99c107
>> <     dir = os.path.split(__file__)[0]
>> ---
>>  >     dir = os.path.split(package.__file__)[0]
>>
>> This change has no impact on the Zope core, but I wanted to check with 
>> the list in case it would break anyone's exsiting testing.
> 
> 
> Hm. Dang. I guess this wasn't used. :(
> 
> I'd prefer to have the package provided as an optional keyword
> argument that defaults to the package containing the calling module.

I did this initially, but it occurred to me that any test module outside 
zope.testing (i.e. all of them) would always provide a package argument.

  -- Garrett





More information about the Zope3-dev mailing list