Just starting out using tox for testing a library with Python 2.7 and 3.4. After using the following tox.ini file I had two questions:
[tox]
envlist = {py27,py3}
sitepackages = True
[testenv]
deps= -rrequirements.txt
commands = nosetests -w tests/ --with-coverage --cover-erase --cover-package=pyppa --with-xunit --xunit-file={toxinidir}/build/ppa-python-sdk_{envname}_unit_tests.xml
coverage xml -o {toxinidir}/build/{envname}_coverage.xml
After running tox I had the following questions:
- The project depends on
numpyandscipywhich are both installed in my global environment, I thought that usingsitepackages = Truein thetox.inifile would prevent tox from installing these in the virutalenvironment and force it to use those in the global environment but tox installed the latest versions in the.tox/virtual environments for both 2.7 and 3. Am I misunderstanding thesitepackagesdirective? - Looking underneath the
.tox/directory at the virtual environment directories I see the following (abbreviated) structure:
.
.tox/
py27/
include/
python2.7/
lib
python2.7/
...
py3/
include/
python2.7/
lib
python2.7/
...
I assure you that this is not a typo. There are directories named python2.7 under the py3 virtual environment include and lib sub-directories and these are the only sub-directories in include and lib. Everything seems to work but I'm just curious as to why these directories are named this way. Can someone shed some light on this?
Thanks.