-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathtox.ini
More file actions
118 lines (107 loc) · 3.08 KB
/
Copy pathtox.ini
File metadata and controls
118 lines (107 loc) · 3.08 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[tox]
isolated_build = True
envlist =
py{311,312,313}-{dafnytests,unit,integ,legacyinteg},
encrypted-interface-coverage,
client-to-resource-conversions-coverage,
resource-to-client-conversions-coverage,
docs,
isort-check,
black-check
[testenv:base-command]
commands = poetry run pytest -s -v -l {posargs}
[testenv]
skip_install = true
allowlist_externals = poetry,ruff,black
passenv = AWS_*
commands_pre =
poetry lock
poetry install --with test
commands =
dafnytests: {[testenv:base-command]commands} test/internaldafny/
unit: {[testenv:base-command]commands} test/unit/
integ: {[testenv:base-command]commands} test/integ/encrypted/
[testenv:legacyinteg]
description = Run integ tests for legacy extern compatibility
commands_pre =
poetry lock
poetry install --with test --extras legacy-ddbec
commands = {[testenv:base-command]commands} test/integ/legacy/
[testenv:encrypted-interface-coverage]
description = Run integ + unit tests for encrypted interfaces with coverage
commands =
python -m pytest -s -vv \
test/integ/encrypted \
test/unit/encrypted \
--cov aws_dbesdk_dynamodb.encrypted \
--cov-report=term-missing \
--cov-fail-under=100
[testenv:client-to-resource-conversions-coverage]
description = Run boto3 conversion tests with coverage
commands =
python -m pytest -s -vv \
test/unit/internal/test_client_to_resource.py \
--cov aws_dbesdk_dynamodb.internal.client_to_resource \
--cov-report=term-missing \
--cov-fail-under=100
[testenv:resource-to-client-conversions-coverage]
description = Run boto3 conversion tests with coverage
commands =
python -m pytest -s -vv \
test/unit/internal/test_resource_to_client.py \
--cov aws_dbesdk_dynamodb.internal.resource_to_client \
--cov-report=term-missing \
--cov-fail-under=100
# Linters
[testenv:ruff]
commands_pre =
poetry install --with linting
deps =
ruff
commands =
ruff check \
src/aws_dbesdk_dynamodb/ \
../../../Examples/runtimes/python/DynamoDBEncryption/ \
../../../Examples/runtimes/python/Migration/ \
test/ \
{posargs}
[testenv:blacken]
commands_pre =
poetry install --with linting
deps =
black
basepython = python3
commands =
black --line-length 120 \
src/aws_dbesdk_dynamodb/ \
../../../Examples/runtimes/python/DynamoDBEncryption/ \
../../../Examples/runtimes/python/Migration/ \
../../../PerfTest/runtimes/python/DynamoDBEncryption/ \
test/ \
{posargs}
[testenv:black-check]
commands_pre =
{[testenv:blacken]commands_pre}
basepython = python3
deps =
{[testenv:blacken]deps}
commands =
{[testenv:blacken]commands} --diff --check
[testenv:lint]
commands_pre =
poetry install --with linting
deps =
black
basepython = python3
commands =
{[testenv:blacken]commands}
{[testenv:ruff]commands} --fix
[testenv:lint-check]
commands_pre =
poetry install --with linting
deps =
black
basepython = python3
commands =
{[testenv:black-check]commands}
{[testenv:ruff]commands}