[TIP] Tox: An environment using sys.executable as the Python interpreter

holger krekel holger at merlinux.eu
Wed Dec 2 02:49:40 PST 2015

On Wed, Dec 02, 2015 at 10:32 +0000, Paul Moore wrote:
> Running tox under CI (travis or Appveyor) there's a common approach
> that I see which is to set TOXENV for each test you want to run. While
> that's mostly fine, it does rely on either there being a default tox
> environment (py35 or similar) that does what you want, or hard-coding
> the CI system's Python location(s) in tox.ini.
> Appveyor includes two versions of most Python interpreters, 32 and 64
> bit. But tox doesn't include default environments corresponding to
> both of these.
> What I'd like to be able to do is to have an environment that is
> "whatever Python I used to invoke tox" - but I don't see anything like
> that. I tried putting the complete path to the Python interpreter in
> TOXENV, but that gave me "unknown environment" :-(

Not sure i fully understand the problem but the "py" environment
does use the tox invocation interpreter.


> The objective is to have a tox.ini that has nothing hard coded in it
> that refers to the CI environment, but which can test with whatever
> version of Python I select. It seems like this should be easy, but I'm
> struggling to find a clean way of doing it.
> Can anyone help?
> Thanks,
> Paul
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

about me:    http://holgerkrekel.net/about-me/
contracting: http://merlinux.eu

More information about the testing-in-python mailing list