[Zope3-dev] Re: [Zope-dev] Re: More arguments for "z" (was Re: Zope and zope)

Barry Warsaw barry at zope.com
Thu Apr 15 11:56:55 EDT 2004


On Thu, 2004-04-15 at 11:39, Casey Duncan wrote:

> Additionally (and Jim and I have discussed this amongst ourselves) I
> feel strongly that the dependancies should be enforced by tests. 

Good point.

> The dependancy tests might need to be separate from unittests because
> they would probably require an import hook or somesuch. Perhaps a tool
> like pychecker could be leveraged or extended to provide this service.
> At a minimum this test would need to be run before packaging a
> distribution, but ideally would happen more often.

I wonder if some kind of doctest could be added to the __init__.py of
the package that hooked __import__ and then attempted to import each
module in the package, tracking the imports.  Then complain about
anything not defined in DEPENDENCIES.cfg (and hmm, what to do about
standard library imports?).

Yeah, maybe some kind of pychecker hook would be better. :/

-Barry





More information about the Zope-Dev mailing list