generated from ChameleonCloud/cc-template
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
40 lines (36 loc) · 1.46 KB
/
tox.ini
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
[flake8]
# line length is intentionally set to 80 here because black uses Bugbear
# See https://black.readthedocs.io/en/stable/the_black_code_style.html#line-length for more details
max-line-length = 80
# Enable bugbear opinionated warnings for line length
select = ["C","E","F","W","B","B950"]
# Ignore E501 for B950 compat
extend-ignore = ["E203", "E501", "W503"]
[pydocstyle]
convention = google
[tox]
minversion = 3.3.0
isolated_build = True
envlist = unit
; NOTE(jason): this is the only option I've found that prevents tox from
; re-creating the environment every time, BUT still works with some poetry
; workflow. We just have to not use `--no-root` in the `poetry install`
; invocation in commands.
skipsdist = True
[testenv]
envdir = {toxinidir}/.venv
whitelist_externals = poetry
commands =
; isolated_build will build the package + its dependencies via poetry due
; to it being the build-tool in use. However, it will not automatically
; install dev dependencies like pytest. Install them manually here.
; TODO: when https://github.com/python-poetry/poetry/pull/2917 is released,
; change to use the --dev-only flag to avoid reinstalling other stuff:
; poetry install --dev-only
; NOTE: when the above^ is in place, probably we need to do something
; to ensure the root package is still installed by poetry somehow.
poetry install -vv
poetry run pytest {posargs} tests/
[testenv:watch]
commands =
poetry run ptw {posargs} tests/