Add a tox.ini

This commit is contained in:
Marius Gedminas 2013-04-10 19:38:12 +03:00
parent b8ca4edb74
commit 002d807ce5
4 changed files with 22 additions and 12 deletions

2
.gitignore vendored
View file

@ -4,3 +4,5 @@ dist/
*.egg-info/
build/
tmp/
.coverage
.tox/

View file

@ -1,6 +1,7 @@
include *.rst
include Makefile
include .gitignore
include tox.ini
include testsuite.py
include tests/*.txt
include .gitignore
recursive-include tests/sample-tree *.py *.zip

View file

@ -18,17 +18,8 @@ check test:
.PHONY: test-all-pythons
test-all-pythons:
## TODO: switch to detox
set -e; \
for ver in 2.6 2.7; do \
if which python$$ver > /dev/null; then \
$(MAKE) test PYTHON=python$$ver; \
else \
echo "=================================="; \
echo "Skipping python$$ver, not available."; \
echo "=================================="; \
fi; \
done
# pip install detox, if missing
detox
.PHONY: preview-pypi-description
preview-pypi-description:

16
tox.ini Normal file
View file

@ -0,0 +1,16 @@
[tox]
envlist =
py26,py27
[testenv]
deps =
commands =
python testsuite.py
[testenv:coverage]
basepython = python2.7
deps =
coverage
commands =
coverage run --source=findimports testsuite.py
coverage report