-
-
Notifications
You must be signed in to change notification settings - Fork 782
Expand file tree
/
Copy pathtox.ini
More file actions
55 lines (50 loc) · 1.47 KB
/
Copy pathtox.ini
File metadata and controls
55 lines (50 loc) · 1.47 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Run all tests:
# tox
# Run all tests in one file in all test environments:
# tox -- tests/test_api.py
# Run one test in all test environments:
# tox -- tests/test_api.py::test_api
# Run all tests in one test environment:
# tox -e py39
# Run all tests in one file in one test environment:
# tox -e py39 -- tests/test_api.py
# Run one test in one test environment:
# tox -e py39 -- tests/test_api.py::test_api
[flake8]
exclude=connexion/__init__.py
rst-roles=class,mod,obj
# https://black.readthedocs.io/en/stable/guides/using_black_with_other_tools.html#flake8
# Longest docstring in current code base
max-line-length=137
extend-ignore=E203,RST303
[tox]
isolated_build = True
envlist =
{py39,py310,py311,py312}-pypi
pre-commit
# min test modifies pyproject.toml so run it last
py39-min
[gh-actions]
python =
3.9: py39-min,py39-pypi
3.10: py310-pypi
3.11: py311-pypi,pre-commit
3.12: py312-pypi
[testenv]
setenv=PYTHONPATH = {toxinidir}:{toxinidir}
deps=
poetry
allowlist_externals=
sed
mv
commands=
# sed in-place flag works on Linux and Mac, writes a .bak file
min: sed -i.bak -E 's/"(\^|~|>=)([ 0-9])/"==\2/' pyproject.toml
poetry lock
poetry install --all-extras --with tests
poetry show
poetry run python -m pytest tests --cov connexion --cov-report term-missing {posargs}
min: mv -f pyproject.toml.bak pyproject.toml
[testenv:pre-commit]
deps=pre-commit
commands=pre-commit run --all-files --show-diff-on-failure