mirror of
https://github.com/sqlalchemy/sqlalchemy.git
synced 2026-06-02 13:59:02 -04:00
- another approach at coverage
This commit is contained in:
@@ -1,57 +1,51 @@
|
||||
|
||||
[tox]
|
||||
envlist = py{26,27,34,35}-{cext,nocext}-{default,sqlitepg,mysql,oracle,mssql}
|
||||
envlist =
|
||||
py{26,27,34,35}-{cext,nocext}-{default,sqlitepg,mysql,oracle,mssql},
|
||||
py27-nocext-cov,
|
||||
py27-cext-cov,
|
||||
py35-nocext-cov
|
||||
|
||||
[testenv]
|
||||
cov_args=--cov=sqlalchemy --cov-report term --cov-report xml --exclude-tag memory-intensive --exclude-tag timing-intensive -k "not aaa_profiling"
|
||||
|
||||
deps=pytest
|
||||
pytest-xdist
|
||||
mock
|
||||
{sqlitepg}: .[postgresql]
|
||||
{mysql}: .[mysql]
|
||||
{mysql}: .[pymysql]
|
||||
{oracle}: .[oracle]
|
||||
{mssql}: .[pyodbc]
|
||||
{mssql}: .[pymssql]
|
||||
sqlitepg: .[postgresql]
|
||||
mysql: .[mysql]
|
||||
mysql: .[pymysql]
|
||||
oracle: .[oracle]
|
||||
mssql: .[pyodbc]
|
||||
mssql: .[pymssql]
|
||||
cov: pytest-cov
|
||||
cov: .[mysql]
|
||||
cov: .[postgresql]
|
||||
|
||||
# -E : ignore PYTHON* environment variables (such as PYTHONPATH)
|
||||
# -s : don't add user site directory to sys.path; also PYTHONNOUSERSITE
|
||||
# the latter is picked up by conftest.py
|
||||
# BASECOMMAND: we can't do section subtitutions in commands
|
||||
# (see https://bitbucket.org/hpk42/tox/issues/307/)
|
||||
setenv=
|
||||
PYTHONPATH=
|
||||
PYTHONNOUSERSITE=1
|
||||
nocext: DISABLE_SQLALCHEMY_CEXT=1
|
||||
|
||||
BASECOMMAND=python -m pytest -n4 --dropfirst
|
||||
cov: BASECOMMAND=python -m pytest -n4 --dropfirst {[testenv]cov_args}
|
||||
|
||||
# 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
|
||||
|
||||
|
||||
commands=
|
||||
{default}: python -m pytest -n4 --dropfirst {posargs}
|
||||
{sqlitepg}: python -m pytest -n4 --dropfirst --db sqlite --db postgresql {posargs}
|
||||
{mysql}: python -m pytest -n4 --dropfirst --db mysql --db pymysql {posargs}
|
||||
{oracle}: python -m pytest -n4 --dropfirst --db oracle {posargs}
|
||||
{mssql}: python -m pytest -n4 --dropfirst --db pyodbc --db pymssql {posargs}
|
||||
|
||||
|
||||
[testenv:coverage]
|
||||
setenv=
|
||||
DISABLE_SQLALCHEMY_CEXT=1
|
||||
|
||||
# see also .coveragerc
|
||||
deps=pytest-cov
|
||||
pytest-xdist
|
||||
coverage
|
||||
mock
|
||||
commands=
|
||||
python -m pytest -n4 --cov=sqlalchemy --cov-report term --cov-report xml \
|
||||
--exclude-tag memory-intensive \
|
||||
--exclude-tag timing-intensive \
|
||||
-k "not aaa_profiling" \
|
||||
{posargs}
|
||||
|
||||
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}
|
||||
|
||||
[testenv:pep8]
|
||||
deps=flake8
|
||||
|
||||
Reference in New Issue
Block a user