test(tox): Add cython envs to tox and travis

In order to catch any subtle cython errors, this patch ensures we are
gating on some cython envs.
This commit is contained in:
kgriffs
2014-03-26 13:56:02 -05:00
parent 04d323b9de
commit d38f9cfe4d
3 changed files with 31 additions and 2 deletions

View File

@@ -3,7 +3,9 @@ install: pip install tox coveralls --use-mirrors
env:
- TOX_ENV=py26
- TOX_ENV=py27
- TOX_ENV=py27_cython
- TOX_ENV=py33
- TOX_ENV=py33_cython
- TOX_ENV=pep8
- TOX_ENV=pylint

View File

@@ -42,7 +42,7 @@ def bench(name, iterations, env, stat_memory):
if heapy and stat_memory:
heap_diff = heapy.heap() - heap_before
sec_per_req = Decimal(total_sec) / Decimal(iterations)
sec_per_req = Decimal(str(total_sec)) / Decimal(str(iterations))
sys.stdout.write('.')
sys.stdout.flush()

29
tox.ini
View File

@@ -1,5 +1,16 @@
[tox]
envlist = py26,py27,py33,pypy,pep8,pylint,py26_bench,py27_bench,py33_bench,pypy_bench
envlist = py26,
py27,
py27_cython,
py33,
py33_cython,
pypy,
pep8,
pylint,
py26_bench,
py27_bench,
py33_bench,
pypy_bench
[testenv]
deps = -r{toxinidir}/tools/test-requires
@@ -16,6 +27,22 @@ commands = {toxinidir}/tools/clean_cythoned.sh {toxinidir}/falcon
--cprofile-stats-file=cprofile.dat \
{posargs}
[testenv:py27_cython]
deps = -r{toxinidir}/tools/test-requires
cython
basepython = python2.7
commands = {toxinidir}/tools/clean_cythoned.sh {toxinidir}/falcon
nosetests \
{posargs}
[testenv:py33_cython]
deps = -r{toxinidir}/tools/test-requires
cython
basepython = python3.3
commands = {toxinidir}/tools/clean_cythoned.sh {toxinidir}/falcon
nosetests \
{posargs}
[testenv:py3kwarn]
deps = py3kwarn
commands = py3kwarn falcon