File: tox.ini

package info (click to toggle)
python-os-faults 0.2.7-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 696 kB
  • sloc: python: 4,797; sh: 54; makefile: 24
file content (69 lines) | stat: -rw-r--r-- 2,141 bytes parent folder | download
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
[tox]
minversion = 2.6
envlist = pep8,py27,py36,cover
skipsdist = True

[testenv]
usedevelop = True
deps =
  -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt}
  -r{toxinidir}/requirements.txt
  -r{toxinidir}/test-requirements.txt
install_command = pip install -U {opts} {packages}
setenv =
   VIRTUAL_ENV={envdir}
whitelist_externals =
    find
    rm
commands =
  find . -type f -name "*.pyc" -delete
  py.test -vvvv --html={envlogdir}/pytest_results.html --self-contained-html --durations=10 "os_faults/tests/unit" {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY

[testenv:pep8]
basepython = python3
commands = flake8 . doc/ext

[testenv:venv]
basepython = python3
commands = {posargs}

[testenv:cover]
basepython = python3
commands =
    py.test --cov-config .coveragerc --cov-report html --cov=os_faults "os_faults/tests/unit"
    coverage html -d {envlogdir}
    coverage report

[testenv:devstack]
# to execute the tests:
#   1) create SSH key in os-faults folder: ssh-keygen -t rsa -f os_faults_key -N ''
#   2) copy public key into authorized_keys of user stack: cat os_faults_key.pub >> ~/.ssh/authorized_keys
#   3) run tests normally: tox -e devstack
basepython = python3
setenv = {[testenv]setenv}
         OS_TEST_PATH=./os_faults/tests/devstack
         OS_DEBUG=True
deps = {[testenv]deps}
extras =
commands =
  py.test -vvvv --html={envlogdir}/pytest_results.html --self-contained-html --durations=10 "os_faults/tests/devstack" {posargs}

[testenv:docs]
basepython = python3
commands =
    rm -rf doc/build
    python setup.py build_sphinx --warning-is-error

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

[flake8]
# E123 skipped because it is ignored by default in the default pep8.
# E125 skipped until https://github.com/jcrocholl/pep8/issues/126 is resolved.
# E731 skipped as assign a lambda expression
ignore = E123,E125,E731
show-source = True
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build