tests, Extensions and __init__

Bernhard Reiter bernhard at intevation.de
Fri Nov 26 16:19:31 CET 2004


On Wed, Nov 24, 2004 at 11:52:58PM +0100, cvs at intevation.de wrote:
> Author: jan
> 
> Update of /thubanrepository/thuban
> In directory doto:/tmp/cvs-serv28055
> 
> Modified Files:
> 	ChangeLog 
> Log Message:
> Fix broken tests for svg extension and added svg legend
> to Experimental menu.

The tests itself were not broken
and using DISPLAY as indicate that we are running tests
is an ugly solution.

I think that we need to refrain from  using __init__.py
to make Extensions a package for code clarity reasons.

Most Extensions should have a gui dependent and a gui-independent part.
To keep that seperated, it must be possible to import the
gui-independent modules separately.
Making those directories packages with __init__ prevents this 
as we always include everything
unless we do ugly hacks that depend on some GUI properties.

If that is the case, then I would prefer the clarify 
over the bit of easiness for import commands.

We can later think of a plug-in mechanism that makes loading plugins
easier for the user, like walking throught subdirectories on Extensions
and importing special file names when running as GUI.
Like 	register_me_wx.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20041126/0c51d0cd/attachment.bin


More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)