diff --git a/.travis.yml b/.travis.yml index 03e306d..9742756 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/falcon/bench/bench.py b/falcon/bench/bench.py index b38296b..8aa9d5a 100755 --- a/falcon/bench/bench.py +++ b/falcon/bench/bench.py @@ -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() diff --git a/tox.ini b/tox.ini index bb928d7..9f2dd69 100644 --- a/tox.ini +++ b/tox.ini @@ -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