[TIP] including (or not) tests within your package
ben+python at benfinney.id.au
Wed Aug 11 00:55:36 PDT 2010
Barry Warsaw <barry at python.org> writes:
> On Aug 10, 2010, at 12:04 PM, Ben Finney wrote:
> >Andrew Bennetts <andrew at bemusement.org> writes:
> >> Surely you don't consider every importable name to be part of the
> >> public interface for a package?
> >Every importable name that isn't marked with a leading-underscore
> >name, yes. That's what that distinction is for, after all.
> I think you meant "after __all__".
> __all__ directly controls what names get imported via from-import-*
> but it's a very strong indicator about what names are intended as part
> of the public interface.
Rather onerous to keep updating that list every time the API changes,
though. The conventions of PEP 8 are much easier to follow, and work by
\ “Welchen Teil von ‘Gestalt’ verstehen Sie nicht? [What part of |
`\ ‘gestalt’ don't you understand?]” —Karsten M. Self |
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the testing-in-python