forked from sqlalchemy/alembic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
75 lines (61 loc) · 2.21 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
[tox]
envlist = py-sqlalchemy
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>4.6
pytest-xdist
mock
sqla13: {[tox]SQLA_REPO}@rel_1_3#egg=sqlalchemy
sqlamaster: {[tox]SQLA_REPO}@master#egg=sqlalchemy
postgresql: psycopg2>=2.7
mysql: mysqlclient>=1.4.0
mysql: pymysql
oracle: cx_oracle>=7,<8;python_version<"3"
oracle: cx_oracle>=7;python_version>="3"
mssql: pyodbc
cov: pytest-cov
sqlalchemy: sqlalchemy>=1.3.0
mako
python-editor>=0.3
python-dateutil
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 --rootdir {toxinidir}
WORKERS={env:TOX_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 mssql}
pyoptimize: PYTHONOPTIMIZE=1
pyoptimize: LIMITTESTS="tests/test_script_consumption.py"
future: SQLALCHEMY_TESTING_FUTURE_ENGINE=1
SQLALCHEMY_WARN_20=1
# 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
black==20.8b1
commands =
flake8 ./alembic/ ./tests/ setup.py docs/build/conf.py {posargs}
black --check setup.py tests alembic