File: tox.ini

package info (click to toggle)
freezer-api 9.0.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 1,884 kB
  • sloc: python: 15,677; sh: 388; makefile: 56
file content (87 lines) | stat: -rw-r--r-- 2,337 bytes parent folder | download | duplicates (3)
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
[tox]
minversion = 2.0
envlist = py36,py38,pep8,pylint,docs
skipsdist = True

[testenv]
basepython = python3
usedevelop = True
deps =
    -c{env:UPPER_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
    -r{toxinidir}/requirements.txt
    -r{toxinidir}/test-requirements.txt


passenv =
    http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

install_command = pip install {opts} {packages}
setenv =
    VIRTUAL_ENV={envdir}
    OS_TEST_PATH = ./freezer_api/tests/unit
    PYTHON=coverage run --source freezer_api --parallel-mode
commands =
    find . -type f -name "*.py[c|o]" -delete
    stestr run {posargs}
    coverage combine
    coverage html -d cover
    coverage xml -o cover/coverage.xml
    coverage report -m
    rm -f .coverage
    rm -rf .testrepository

whitelist_externals =
    find
    coverage
    rm

python_files = test_*.py
norecursedirs  = .tox .venv 

[testenv:py36]
basepython = python3.6

[testenv:py38]
basepython = python3.8

[testenv:venv]
commands = {posargs}

[testenv:pylint]
commands = pylint --rcfile .pylintrc freezer_api

[testenv:pep8]
commands = flake8 freezer_api

[flake8]
# Ignored hackings:
# H202 -> assertRaises(Exception, ...) too broad
# H401 -> Docstrings should not start with a space
# H404 -> Multi line docstrings should start without a leading new line.
# H405 -> Multi line docstrings should start with a one line summary followed by an empty line.
ignore = H202,H401,H404,H405
show-source = True
exclude = .venv,.tox,dist,doc,*egg,specs,build,*/source/conf.py

[testenv:docs]
commands =
  rm -rf api-ref/build
#  sphinx-build -W --keep-going -b html api-ref/source api-ref/build/html
  sphinx-build -W --keep-going -b html doc/source doc/build/html
[testenv:api-ref]
whitelist_externals = rm
commands =
  rm -rf api-ref/build
  sphinx-build -W -a -E --keep-going -b html -d api-ref/build/doctrees api-ref/source api-ref/build/html

[testenv:releasenotes]
commands = sphinx-build -W -a -E -d releasenotes/build/doctrees --keep-going -b html releasenotes/source releasenotes/build/html

[testenv:genpolicy]
commands = oslopolicy-sample-generator --config-file etc/freezer/freezer-policy-generator.conf

[testenv:lower-constraints]
deps =
  -c{toxinidir}/lower-constraints.txt
  -r{toxinidir}/test-requirements.txt
  -r{toxinidir}/requirements.txt