Repository navigation
Expand file tree
/
Copy pathtox.ini
More file actions
41 lines (36 loc) · 1.45 KB
/
Copy pathtox.ini
File metadata and controls
41 lines (36 loc) · 1.45 KB
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
[tox]
envlist = py38,python3.10,py311,pep8,testenv
# TODO(gyee): we are not distributing the test code right now. Will need
# to revisit this once we have majority of the tests developed.
skipsdist = True
[testenv]
basepython = python3
setenv =
VIRTUAL_ENV = {envdir}
PYTHONWARNINGS = ignore:Unverified HTTPS request
PIP_DISABLE_PIP_VERSION_CHECK = 1
# we're breaking convention with deps & install_command please see commands
allowlist_externals = {toxinidir}/*
bash
find
# we're going against convention here but it offers us more control
# we install everything with the hashes, then content inside apiclient dir (ensuring dependencies come from hashes ie: requests, as to not attempt to fetch them again)
commands =
; {toxinidir}/terraform_test_artifacts/terraform_install.sh
pip install -r{toxinidir}/test-requirements.txt --require-hashes
pip install --no-deps -e{toxinidir}/apiclient
find . -type f -name "*.pyc" -delete
pytest -c {env:PYTEST_CONFIG:{toxinidir}/tox.ini} {posargs}
passenv = http_proxy,HTTP_PROXY,https_proxy,HTTPS_PROXY,no_proxy,NO_PROXY,PBR_VERSION,GITHUB_USERNAME,GITHUB_ACCESS_TOKEN
[testenv:py311]
basepython = python3.11
[testenv:pep8]
# since we morph to hashes we also will separate the linting package stuff into it's own requirements
deps = -r{toxinidir}/lint-requirements.txt
commands =
flake8
[flake8]
max-line-length = 99
[pytest]
initial_sort = original
render_collapsed = all