[TIP] Multiplatform testing with nose

holger krekel holger at merlinux.eu
Mon Feb 14 15:28:49 PST 2011


On Mon, Feb 14, 2011 at 17:15 -0500, Alex Gaynor wrote:
> On Mon, Feb 14, 2011 at 4:53 PM, Éric Araujo <merwok at netwok.org> wrote:
> 
> > Le 14/02/2011 18:45, holger krekel a écrit :
> > > Besides, it's always good to avoid code in __init__.py
> > > files including imports.
> >
> > Could you elaborate on the reasons for that?  This has come up recently
> > on another ML, python-dev I think, and the only rationale was use of
> > setuptools namespace packages.
> >
> > Regards
> >
> > _______________________________________________
> > testing-in-python mailing list
> > testing-in-python at lists.idyll.org
> > http://lists.idyll.org/listinfo/testing-in-python
> >
> 
> There are 2 issues: a) it's really easy to get yourself into a circular
> import, and b) most people forget to look in __init__.py for code :)

c) if you have code in __init__.py you cannot easily map an import path
to a file, you have to code through every intermediate __init__.py.

Holger

> Alex
> 
> -- 
> "I disapprove of what you say, but I will defend to the death your right to
> say it." -- Evelyn Beatrice Hall (summarizing Voltaire)
> "The people's good is the highest law." -- Cicero

> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python


-- 



More information about the testing-in-python mailing list