[tox]
-envlist =
- py{26,27,34,35}-{cext,nocext}-{default,sqlitepg,mysql,oracle,mssql},
- py27-nocext-cov,
- py27-cext-cov,
- py35-nocext-cov
+envlist = py{26,27,34,35}-{cext,nocext}
[testenv]
# note that we have a .coveragerc file that points coverage specifically
# Jenkins etc. need to call "coverage erase" externally.
cov_args=--cov=sqlalchemy --cov-report term --cov-append --cov-report xml --exclude-tag memory-intensive --exclude-tag timing-intensive -k "not aaa_profiling"
-usedevelop={env:USEDEVELOP}
+usedevelop=
+ cov: True
deps=pytest
pytest-xdist
mock
- sqlitepg: .[postgresql]
+ postgresql: .[postgresql]
mysql: .[mysql]
mysql: .[pymysql]
oracle: .[oracle]
mssql: .[pyodbc]
mssql: .[pymssql]
cov: pytest-cov
- cov: .[mysql]
- cov: .[postgresql]
whitelist_externals=sh
# BASECOMMAND - using an env variable here so we can use it
# as a substitution in a command (see https://bitbucket.org/hpk42/tox/issues/307/)
#
-# USEDEVELOP - also an env variable because we can't otherwise use a factor
-# to control the value of the "usedevelop" setting (should also be a tox bug)
-# We want develop=True when coverage is in play, because coverage is
-# always against the files physically in ./lib. We are doing an aggregate
-# of coverage into one file across multiple test runs.
-#
setenv=
PYTHONPATH=
PYTHONNOUSERSITE=1
- USEDEVELOP=False
- nocext: DISABLE_SQLALCHEMY_CEXT=1
BASECOMMAND=python -m pytest -n4 --dropfirst
- cov: BASECOMMAND=python -m pytest -n4 --dropfirst {[testenv]cov_args}
- cov: USEDEVELOP=True
+
+ nocext: DISABLE_SQLALCHEMY_CEXT=1
+ cov: COVERAGE={[testenv]cov_args}
+ sqlite: SQLITE=--db sqlite
+ postgresql: POSTGRESQL=--db postgresql
+ mysql: MYSQL=--db mysql --db pymysql
+ oracle: ORACLE=--db oracle
+ mssql: MSSQL=--db pyodbc --db pymssql
+ backendonly: BACKENDONLY=--backend-only
# tox as of 2.0 blocks all environment variables from the
# outside, unless they are here (or in TOX_TESTENV_PASSENV,
# for nocext, we rm *.so in lib in case we are doing usedevelop=True
commands=
- nocext: sh -c "rm -f lib/sqlalchemy/*.so"
- default: {env:BASECOMMAND} {posargs}
- sqlitepg: {env:BASECOMMAND} --db sqlite --db postgresql {posargs}
- mysql: {env:BASECOMMAND} --db mysql --db pymysql {posargs}
- oracle: {env:BASECOMMAND} --db oracle {posargs}
- mssql: {env:BASECOMMAND} --db pyodbc --db pymssql {posargs}
- cov: {env:BASECOMMAND} --db sqlite --db postgresql --db mysql {posargs}
+ {nocext}: sh -c "rm -f lib/sqlalchemy/*.so"
+ {env:BASECOMMAND} {env:SQLITE:} {env:POSTGRESQL:} {env:MYSQL:} {env:ORACLE:} {env:MSSQL:} {env:BACKENDONLY:} {env:COVERAGE:} {posargs}
[testenv:pep8]
deps=flake8