File: tox.ini

package info (click to toggle)
zope.sqlalchemy 4.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 340 kB
  • sloc: python: 976; makefile: 8
file content (104 lines) | stat: -rw-r--r-- 3,109 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/zope-product
[tox]
minversion = 3.18
envlist =
    lint
    py37
    py38
    py39
    py310
    py311
    coverage
    py{37,38,39}-sqlalchemy11
    py{37,38,39,310}-sqlalchemy{12,13}
    py{37,38,39,310,311}-sqlalchemy{14,20}

[testenv]
skip_install = true
deps =
    zc.buildout >= 3.0.1
    wheel > 0.37
    sqlalchemy11: SQLAlchemy==1.1.*
    sqlalchemy12: SQLAlchemy==1.2.*
    sqlalchemy13: SQLAlchemy==1.3.*
    sqlalchemy14: SQLAlchemy==1.4.*
    sqlalchemy20: SQLAlchemy==2.0.*
commands_pre =
    !sqlalchemy20: sh -c 'if [ '{env:CI:false}' = 'true' ]; then {envbindir}/buildout -nc {toxinidir}/github_actions.cfg buildout:directory={envdir} buildout:develop={toxinidir} ; fi'
    !sqlalchemy20: sh -c 'if [ '{env:CI:false}' != 'true' ]; then {envbindir}/buildout -nc {toxinidir}/postgres.cfg buildout:directory={envdir} buildout:develop={toxinidir} ; fi'
    sqlalchemy20: sh -c 'if [ '{env:CI:false}' = 'true' ]; then {envbindir}/buildout -nc {toxinidir}/github_actions20.cfg buildout:directory={envdir} buildout:develop={toxinidir} ; fi'
    sqlalchemy20: sh -c 'if [ '{env:CI:false}' != 'true' ]; then {envbindir}/buildout -nc {toxinidir}/postgres20.cfg buildout:directory={envdir} buildout:develop={toxinidir} ; fi'
commands =
    {envbindir}/test {posargs:-cv}
    sh -c 'if [ '{env:TEST_PG:{env:CI:false}}' = 'true' ]; then {envbindir}/testpg {posargs:-cv} ; fi'
    sh -c 'if [ '{env:TEST_PG:{env:CI:false}}' = 'true' ]; then {envbindir}/testpg2 {posargs:-cv} ; fi'
    sqlalchemy20: sh -c 'if [ '{env:TEST_PG:{env:CI:false}}' = 'true' ]; then {envbindir}/testpg3 {posargs:-cv} ; fi'
    sqlalchemy20: sh -c 'if [ '{env:TEST_PG:{env:CI:false}}' = 'true' ]; then {envbindir}/testpg32 {posargs:-cv} ; fi'
passenv =
    CI
    TEST_PG
allowlist_externals =
    sh

[testenv:lint]
basepython = python3
commands_pre =
    mkdir -p {toxinidir}/parts/flake8
allowlist_externals =
    mkdir
commands =
    isort --check-only --diff {toxinidir}/src {toxinidir}/setup.py
    flake8 {toxinidir}/src {toxinidir}/setup.py
    check-manifest
    check-python-versions
deps =
    check-manifest
    check-python-versions
    flake8
    isort
    # Useful flake8 plugins that are Python and Plone specific:
    flake8-coding
    flake8-debugger
    mccabe

[testenv:isort-apply]
basepython = python3
commands_pre =
deps =
    isort
commands =
    isort {toxinidir}/src {toxinidir}/setup.py []

[testenv:coverage]
basepython = python3
skip_install = true
allowlist_externals =
    {[testenv]allowlist_externals}
    mkdir
deps =
    {[testenv]deps}
    coverage
commands =
    mkdir -p {toxinidir}/parts/htmlcov
    coverage run {envdir}/bin/test {posargs:-cv}
    coverage html
    coverage report -m --fail-under=65

[coverage:run]
branch = True
source = zope.sqlalchemy

[coverage:report]
precision = 2
exclude_lines =
    pragma: no cover
    pragma: nocover
    except ImportError:
    raise NotImplementedError
    if __name__ == '__main__':
    self.fail
    raise AssertionError

[coverage:html]
directory = parts/htmlcov