File: tox.ini

package info (click to toggle)
alembic 1.0.0-2~bpo9+2
  • links: PTS, VCS
  • area: main
  • in suites: stretch-backports
  • size: 2,088 kB
  • sloc: python: 22,563; makefile: 95; sh: 10
file content (70 lines) | stat: -rw-r--r-- 2,118 bytes parent folder | download | duplicates (2)
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
[tox]

# current mysqlclient fails with <=SQLA 0.9 on py3k due to
# old unicode statements flag
envlist = py{27,34,35,36,37}-sqla{10,11,12,master}, py{27}-sqla{079,084,09}

SQLA_REPO = {env:SQLA_REPO:git+https://zzzeek@bitbucket.org/zzzeek/sqlalchemy.git}

[testenv]
cov_args=--cov=alembic --cov-report term --cov-report xml

deps=pytest
     pytest-xdist
     mock
     sqla079: {[tox]SQLA_REPO}@rel_0_7_9
     sqla084: {[tox]SQLA_REPO}@rel_0_8_4
     sqla09: {[tox]SQLA_REPO}@rel_0_9
     sqla10: {[tox]SQLA_REPO}@rel_1_0
     sqla11: {[tox]SQLA_REPO}@rel_1_1
     sqla12: {[tox]SQLA_REPO}@rel_1_2
     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 oracle_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}: python reap_oracle_dbs.py oracle_idents.txt


[testenv:pep8]
deps=flake8
commands = python -m flake8 {posargs}


[flake8]

show-source = True
ignore = E711,E712,E721,D,N
# F841,F811,F401
exclude=.venv,.git,.tox,dist,doc,*egg,build