100 lines
2.7 KiB
INI
100 lines
2.7 KiB
INI
# Tox (https://tox.readthedocs.io) is a tool for running tests in multiple
|
|
# virtualenvs. "pip install tox" and run "tox" from this directory.
|
|
|
|
# Adapted from Tornado's tox.ini.
|
|
|
|
[tox]
|
|
envlist =
|
|
# Tornado 5 supports Python 2.7.9+ and 3.4+.
|
|
tornado5-{pypy3,py35,py36,py37},
|
|
|
|
# Tornado 6 supports Python 3.5+.
|
|
tornado6-{pypy3,py35,py36,py37,py38},
|
|
|
|
# Test Tornado on master in a few configurations.
|
|
tornado_git-{py35,py36,py37},
|
|
|
|
# Ensure the sphinx build has no errors or warnings.
|
|
py3-sphinx-docs,
|
|
|
|
# Run the doctests, include examples and tutorial, via Sphinx.
|
|
py3-sphinx-doctest,
|
|
|
|
# asyncio without Tornado.
|
|
asyncio-{py35,py36,py37,py38},
|
|
|
|
# Test PyMongo HEAD, not the latest release.
|
|
py3-pymongo-master,
|
|
|
|
# Apply PyMongo's test suite to Motor via Synchro.
|
|
synchro37
|
|
|
|
[testenv]
|
|
passenv =
|
|
DB_IP
|
|
DB_PORT
|
|
DB_USER
|
|
DB_PASSWORD
|
|
CERT_DIR
|
|
ASYNC_TEST_TIMEOUT
|
|
|
|
basepython =
|
|
py35: {env:PYTHON_BINARY:python3.5}
|
|
py36: {env:PYTHON_BINARY:python3.6}
|
|
py37,synchro37: {env:PYTHON_BINARY:python3.7}
|
|
py38: {env:PYTHON_BINARY:python3.8}
|
|
pypy3: {env:PYTHON_BINARY:pypy3}
|
|
|
|
# Default Python 3 when we don't care about minor version.
|
|
py3: {env:PYTHON_BINARY:python3.6}
|
|
|
|
deps =
|
|
tornado5: tornado>=5,<6
|
|
tornado6: tornado>=6,<7
|
|
tornado_git: git+https://github.com/tornadoweb/tornado.git
|
|
|
|
{py35,py36,py37,py38}: aiohttp
|
|
|
|
sphinx: sphinx
|
|
sphinx: aiohttp
|
|
sphinx: git+https://github.com/tornadoweb/tornado.git
|
|
|
|
py3-pymongo-master: git+https://github.com/mongodb/mongo-python-driver.git
|
|
py3-pymongo-master: tornado>=5,<6
|
|
|
|
synchro37: tornado>=6,<7
|
|
synchro37: nose
|
|
|
|
commands =
|
|
python --version
|
|
python setup.py test --xunit-output=xunit-results {posargs}
|
|
|
|
[testenv:py3-sphinx-docs]
|
|
changedir = doc
|
|
commands =
|
|
sphinx-build -q -E -W -b html . {envtmpdir}/html {posargs}
|
|
|
|
[testenv:py3-sphinx-doctest]
|
|
setenv = PYTHONHASHSEED=0
|
|
changedir = doc
|
|
commands =
|
|
sphinx-build -q -E -b doctest . {envtmpdir}/doctest {posargs}
|
|
|
|
[testenv:synchro27]
|
|
whitelist_externals =
|
|
git
|
|
setenv =
|
|
PYTHONPATH = {envtmpdir}/mongo-python-driver
|
|
commands =
|
|
git clone --depth 1 https://github.com/mongodb/mongo-python-driver.git {envtmpdir}/mongo-python-driver
|
|
python -m synchro.synchrotest --with-xunit --xunit-file=xunit-synchro-results -v -w {envtmpdir}/mongo-python-driver {posargs}
|
|
|
|
[testenv:synchro37]
|
|
whitelist_externals =
|
|
git
|
|
setenv =
|
|
PYTHONPATH = {envtmpdir}/mongo-python-driver
|
|
commands =
|
|
git clone --depth 1 https://github.com/mongodb/mongo-python-driver.git {envtmpdir}/mongo-python-driver
|
|
python3 -m synchro.synchrotest --with-xunit --xunit-file=xunit-synchro-results -v -w {envtmpdir}/mongo-python-driver {posargs}
|