-
-
Notifications
You must be signed in to change notification settings - Fork 305
/
setup.cfg
49 lines (42 loc) · 1.31 KB
/
setup.cfg
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
[flake8]
max-line-length = 88
extend-ignore = E203,E501
[tox:tox]
envlist = cover,lint,mypy
isolated_build = true
# Standard env will run all test available for all providers.
[testenv]
allowlist_externals = poetry
extras =
full
setenv =
PYTEST_ADDOPTS = {env:PYTEST_ADDOPTS:--numprocesses auto}
PYTHONHASHSEED = 0
commands_pre =
poetry install --extras full --no-root --sync
commands =
poetry run pytest tests/ \
--junitxml=junit/test-results.xml --dist=loadfile
# Cover env will run all test available for all providers with coverage enabled.
[testenv:cover]
commands =
poetry run pytest tests/ \
--junitxml=junit/test-results.xml --dist=loadfile \
--cov=lexicon --cov-report=term-missing --cov-report=xml
# Light env will run all tests except for providers with optional dependencies.
[testenv:light]
extras =
commands_pre =
poetry install --no-root --sync
commands =
poetry run pytest tests/ \
--junitxml=junit/test-results.xml --dist=loadfile \
--xfail-providers-with-missing-deps
# Lint env will check for code quality and errors, and fails if it does not match the minimal requirements.
[testenv:lint]
commands =
poetry run flake8 src tests
# Mypy env will check for types in the Lexicon codebase.
[testenv:mypy]
commands =
poetry run mypy src tests