2013-11-01 22:34:18 +00:00
[tox]
2022-07-26 21:11:25 +00:00
envlist = {py27,py35,py36,py37,py38,py39,py310,pypy,pypy3}-{with,without}_coverage-{,appveyor}
2013-11-01 22:34:18 +00:00
[testenv]
2017-07-05 10:10:33 +00:00
install_command =
2020-01-14 20:21:02 +00:00
{envpython} -m pip install -vvv {opts} {packages}
2014-04-18 23:28:37 +00:00
; setenv =
; ; The following two flags are a workaround for an issue with building
; ; Python extensions on OSX with xcode 5.1.
; ; See: http://stackoverflow.com/questions/22313407/
2014-04-18 23:19:43 +00:00
; CFLAGS=-Qunused-arguments
; CPPFLAGS=-Qunused-arguments
2013-11-01 22:34:18 +00:00
deps =
2015-02-13 17:07:17 +00:00
; use specific versions of testing tools with which this is known to work
2020-04-07 10:02:06 +00:00
with_coverage: coverage> = 5,<6
2020-04-16 23:08:16 +00:00
{py27,pypy}: unittest2 = =1.1.0
{py27,pypy}: mock = =1.3.0
{py27,py35}: biopython< = 1.76
2022-07-26 21:11:25 +00:00
{py36,py37,py38,py39,py310,py311,pypy3}: biopython
2015-02-02 01:37:26 +00:00
whitelist_externals =
mv
2014-04-12 10:10:52 +00:00
commands =
2015-02-13 17:07:17 +00:00
; Notes:
; * run tests both with and without the C extensions (including Cython)
; * if running with coverage, merge the coverage run results from both runs
; * for Python 2.6 use the unit2 script since -m unittest2 doesn't work
; (but when running with coverage, coverage run -m unittest2 works)
2020-04-23 06:19:24 +00:00
{py27,pypy}-without_coverage: {envbindir}/unit2 discover -v tests -t {toxinidir}
2020-04-16 23:08:16 +00:00
{py27,pypy}-with_coverage: {envbindir}/coverage run --source = fuzzysearch -m unittest2 discover tests
2022-07-26 21:11:25 +00:00
{py35,py36,py37,py38,py39,py310,pypy3}-without_coverage: {envpython} -m unittest discover -v tests
{py35,py36,py37,py38,py39,py310,pypy3}-with_coverage: {envbindir}/coverage run --source = fuzzysearch -m unittest discover tests
2015-02-07 11:18:02 +00:00
with_coverage: mv .coverage .coverage.with_extensions
2017-07-06 08:06:07 +00:00
{envpython} -c 'import os; [os.remove(os.path.join(d, fn)) for (d, dns, fns) in os.walk(os.path.join(r"{envsitepackagesdir}", "fuzzysearch")) for fn in fns if fn.endswith((".so", ".pyd"))]'
2020-04-23 06:19:24 +00:00
{py27,pypy}-without_coverage: {envbindir}/unit2 discover -v tests -t {toxinidir}
2020-04-16 23:08:16 +00:00
{py27,pypy}-with_coverage: {envbindir}/coverage run --source = fuzzysearch -m unittest2 discover tests
2022-07-26 21:11:25 +00:00
{py35,py36,py37,py38,py39,py310,pypy3}-without_coverage: {envpython} -m unittest discover -v tests
{py35,py36,py37,py38,py39,py310,pypy3}-with_coverage: {envbindir}/coverage run --source = fuzzysearch -m unittest discover tests
2015-02-07 11:18:02 +00:00
with_coverage: mv .coverage .coverage.no_extensions
with_coverage: {envbindir}/coverage combine
2015-09-16 18:46:36 +00:00
basepython =
py27: python2.7
py35: python3.5
2017-01-23 14:54:43 +00:00
py36: python3.6
2018-12-06 21:15:27 +00:00
py37: python3.7
2020-01-14 13:03:26 +00:00
py38: python3.8
2022-07-26 21:11:25 +00:00
py39: python3.9
py310: python3.10
2020-04-16 23:08:16 +00:00
pypy: pypy
pypy3: pypy3
2017-07-06 09:07:39 +00:00
appveyor: {env:PYTHON:}\\python.exe