xref: /sqlalchemy/tox.ini (revision 6b051503)
16b051503SMike Bayer
29281e700SMike Bayer[tox]
36b051503SMike Bayerenvlist = py{26,27,34,35}-sqla_{cext,nocext}-db_{default,sqlitepg,mysql,oracle,mssql}
49281e700SMike Bayer
59281e700SMike Bayer[testenv]
69281e700SMike Bayerdeps=pytest
76b051503SMike Bayer     pytest-xdist
89281e700SMike Bayer     mock
96b051503SMike Bayer     db_sqlitepg: .[postgresql]
106b051503SMike Bayer     db_mysql: .[mysql]
116b051503SMike Bayer     db_mysql: .[pymysql]
126b051503SMike Bayer     db_oracle: .[oracle]
136b051503SMike Bayer     db_mssql: .[pyodbc]
146b051503SMike Bayer     db_mssql: .[pymssql]
159281e700SMike Bayer
16f30e35baSMike Bayer# -E     : ignore PYTHON* environment variables (such as PYTHONPATH)
17f30e35baSMike Bayer# -s     : don't add user site directory to sys.path; also PYTHONNOUSERSITE
18f30e35baSMike Bayer# the latter is picked up by conftest.py
19f30e35baSMike Bayersetenv=
20f30e35baSMike Bayer    PYTHONPATH=
21f30e35baSMike Bayer    PYTHONNOUSERSITE=1
226b051503SMike Bayer    sqla_nocext: DISABLE_SQLALCHEMY_CEXT=1
23f30e35baSMike Bayer
24f30e35baSMike Bayer
257f423e87SMike Bayer# tox as of 2.0 blocks all environment variables from the
267f423e87SMike Bayer# outside, unless they are here (or in TOX_TESTENV_PASSENV,
27077f26afSMike Bayer# wildcards OK).  Need at least these
28077f26afSMike Bayerpassenv=ORACLE_HOME NLS_LANG
297f423e87SMike Bayer
309281e700SMike Bayer
319281e700SMike Bayercommands=
326b051503SMike Bayer  db_{default}: python -m pytest -n4 --dropfirst {posargs}
336b051503SMike Bayer  db_{sqlitepg}: python -m pytest -n4 --dropfirst --db sqlite --db postgresql {posargs}
346b051503SMike Bayer  db_{mysql}: python -m pytest -n4 --dropfirst --db mysql --db pymysql {posargs}
356b051503SMike Bayer  db_{oracle}: python -m pytest -n4 --dropfirst --db oracle {posargs}
366b051503SMike Bayer  db_{mssql}: python -m pytest -n4 --dropfirst --db pyodbc --db pymssql {posargs}
379281e700SMike Bayer
389281e700SMike Bayer
399281e700SMike Bayer[testenv:coverage]
40eaaaef6aSMike Bayersetenv=
41eaaaef6aSMike Bayer  DISABLE_SQLALCHEMY_CEXT=1
42eaaaef6aSMike Bayer
43d7498cf4SMike Bayer# see also .coveragerc
449d617468SGilles Dartiguelonguedeps=pytest-cov
459d617468SGilles Dartiguelongue     coverage
469d617468SGilles Dartiguelongue     mock
479281e700SMike Bayercommands=
48d7498cf4SMike Bayer  python -m pytest --cov=sqlalchemy --cov-report term --cov-report xml \
49d7498cf4SMike Bayer    --exclude-tag memory-intensive \
50d7498cf4SMike Bayer    --exclude-tag timing-intensive \
51d7498cf4SMike Bayer    -k "not aaa_profiling" \
52d7498cf4SMike Bayer    {posargs}
53d7498cf4SMike Bayer
549281e700SMike Bayer
559281e700SMike Bayer[testenv:pep8]
561217d6ceSMike Bayerdeps=flake8
5730ab1a02SMike Bayercommands = python -m flake8 {posargs}
589281e700SMike Bayer
599281e700SMike Bayer
609281e700SMike Bayer[flake8]
619281e700SMike Bayershow-source = True
622743b674SMike Bayerignore = E711,E712,E721,N806
639281e700SMike Bayerexclude=.venv,.git,.tox,dist,doc,*egg,build
649281e700SMike Bayer
65