[tox] envlist = py SQLA_REPO = {env:SQLA_REPO:git+https://github.com/sqlalchemy/sqlalchemy.git} [testenv] cov_args=--cov=alembic --cov-report term --cov-report xml deps=pytest!=3.9.1,!=3.9.2 pytest-xdist mock sqla11: {[tox]SQLA_REPO}@rel_1_1 sqla12: {[tox]SQLA_REPO}@rel_1_2 sqla13: {[tox]SQLA_REPO}@rel_1_3 sqlamaster: {[tox]SQLA_REPO}@master postgresql: psycopg2 mysql: mysqlclient mysql: pymysql oracle: cx_oracle>=6.0,!=6.4 mssql: pymssql cov: pytest-cov usedevelop= cov: True # only use --dropfirst option if we're *not* using -n; # if -n is used, we're working in brand new DBs anyway setenv= BASECOMMAND=python -m pytest WORKERS=-n4 sqla079: WORKERS=--dropfirst cov: COVERAGE={[testenv]cov_args} sqlite: SQLITE={env:TOX_SQLITE:--db sqlite} postgresql: POSTGRESQL={env:TOX_POSTGRESQL:--db postgresql} mysql: MYSQL={env:TOX_MYSQL:--db mysql} oracle: ORACLE={env:TOX_ORACLE:--db oracle} --low-connections --write-idents db_idents.txt mssql: MSSQL={env:TOX_MSSQL:--db pymssql} pyoptimize: PYTHONOPTIMIZE=1 pyoptimize: LIMITTESTS="tests/test_script_consumption.py" # tox as of 2.0 blocks all environment variables from the # outside, unless they are here (or in TOX_TESTENV_PASSENV, # wildcards OK). Need at least these passenv=ORACLE_HOME NLS_LANG TOX_SQLITE TOX_POSTGRESQL TOX_MYSQL TOX_ORACLE TOX_MSSQL commands= {env:BASECOMMAND} {env:WORKERS} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:COVERAGE:} {env:LIMITTESTS:} {posargs} {oracle,mssql}: python reap_dbs.py db_idents.txt [testenv:pep8] basepython = python3 deps= flake8 flake8-import-order flake8-builtins flake8-docstrings flake8-rst-docstrings pydocstyle<4.0.0 # used by flake8-rst-docstrings pygments commands = flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py