[TIP] pytest, making a standalone script with extensions
francis
francismb at email.de
Sat Dec 3 09:17:14 PST 2011
Hi Michael,
I appreciate your opinion in that question. Maybe I should have
hat to ask: witch kind of new problems can arise from doing this,
and maybe is worth a new thread but well, just to complement the
info here:
> In general the answer is no, bundling your dependencies is not
> considered good practise. It puts code that isn't yours (and shouldn't
> be modified) into your version control repository
Modifying the code is sometimes necessary to be able to get a “feature”
that only one wants (to get it better integrated with the actual
infrastructure
or to be able to evolute it overtime into another one).
> and actively prevents you from getting bug fixes or updates.
Some times updates bring new features or new dependencies that one
doesn't wants (or don't integrate very well). I prefer here to actively
decide if the update is worth (not automatically).
> One alternative is to run your own "mirror" of pypi for your specific
> dependencies (it can actually just be a plain directory of files served
> by Apache), updated from a cron job, and point pip at that. That allows
> your infrastructure to be completely under your control and not be
> dependent on an external resource (pypi). You do then have to manage
> getting updated versions yourself.
>
That's a idea to be considered. In general I try to reduce dependencies
as much as possible (if it can be done with the “included batteries”,
better)
and having a standalone “test runner” into the repo makes the “checkout
and test” IMHO easier.
cheers,
francis
More information about the testing-in-python
mailing list