[TIP] tox offline usage

holger krekel holger at merlinux.eu
Mon Jun 27 00:30:54 PDT 2011


On Sun, Jun 26, 2011 at 16:23 -0600, Aaron Meurer wrote:
> On Sun, Jun 26, 2011 at 7:25 AM, holger krekel <holger at merlinux.eu> wrote:
> > Hi Alexander, Aaron,
> >
> > On Mon, Jun 20, 2011 at 15:35 -0600, Aaron Meurer wrote:
> >> On Mon, Jun 20, 2011 at 11:28 AM, Alexander Steinert <sputnik at termo.net> wrote:
> >> > Dear list,
> >> >
> >> > I would like to use tox in an environment that has no internet access.
> >> > In my trivial example, I specify a dependency in the testenv section:
> >> >
> >> >    [tox]
> >> >    envlist = py26
> >> >    [testenv]
> >> >    deps = pytest==2.0.3
> >> >    commands = true
> >> >
> >> > I want tox to install the pytest-2.0.3.zip distribution that exists in
> >> > my file system, say ./lib/pytest-2.0.3.zip.
> >> >
> >> > With pip, I can achieve that by using --no-index and --find-links, but I
> >> > found no way to tell tox to call pip that way.
> >> >
> >> > Using the indexserver setting would require me to have a PyPI server
> >> > running in my network. I'd like to avoid that.
> >> >
> >> > Apart from patching tox' code, is there any other way to achieve my
> >> > goal?
> >
> > you could try to copy pytest-2.0.3 and others dependencies into
> > $HOME/.tox/distshare - which is looked up by tox.
> >
> > See the docs for more info:
> > http://readthedocs.org/docs/tox/en/latest/example/general.html?highlight=distshare#access-package-artifacts-between-multiple-tox-runs
> >
> >> > While we're at it: When I run tox (configured as above) for the first
> >> > time, it fails (as expected) with "could not install deps
> >> > [pytest==2.0.3]". When run again, it is happily "reusing existing
> >> > matching virtualenv py26" and running /bin/true but silently ignoring
> >> > the missing dependency. Should I file a bug report?
> >>
> >> I've also noticed this.  Is this an intended behavior?  It's let me to
> >> be confused a couple of times regarding dependencies that don't
> >> install properly (see my previous threads on this mailing list).
> >
> > Would be good if one of you provides a minimal example and
> > post an issue on the tracker.
> 
> Sure, but where is the issue tracker?  A Google search for "tox issue
> tracker" didn't bring up anything that seems to be it.

sure, you can find the relevant link here:

http://tox.readthedocs.org/en/latest/support.html#support

Actually, there _should_ be a top-level navigation link but
i just noticed that readthedocs does not display the navigation
header :/ 

best,
holger

> Aaron Meurer
> 
> >
> >> By the way, if you're wondering, I would prefer that it didn't do
> >> this, because if it can't install all the dependencies correctly, then
> >> I consider that particular test environment to be broken, and the way
> >> it is now, it falsely makes it appear that they are not.
> >
> > right.
> >
> > holger
> >
> 



More information about the testing-in-python mailing list