Repository navigation
Expand file tree
/
Copy pathpyproject.toml
More file actions
65 lines (55 loc) · 1.84 KB
/
Copy pathpyproject.toml
File metadata and controls
65 lines (55 loc) · 1.84 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
[project]
name = "qa-api-python"
version = "1.0.0"
description = "Testes de API (BDD + API Clients) contra a restful-booker demo API"
requires-python = ">=3.12"
authors = [{ name = "ThomasTDS" }]
license = "ISC"
dependencies = ["requests>=2.32", "pydantic>=2.9"]
[project.optional-dependencies]
dev = [
"pytest>=8.3",
"pytest-bdd>=8.1",
"pytest-rerunfailures>=15.0",
"pytest-html>=4.1",
"pytest-cov>=6.0",
"requests-mock>=1.12",
"pip-audit>=2.7",
"ruff>=0.14",
"mypy>=1.14",
"types-requests>=2.32",
"pre-commit>=4.0",
]
[build-system]
requires = ["setuptools>=68"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
include = ["api*", "models*"]
[tool.pytest.ini_options]
testpaths = ["steps", "tests"]
addopts = "--strict-markers --reruns 1 --html=reports/report.html --self-contained-html --cov=api --cov=models --cov-report=term-missing --cov-report=xml:reports/coverage.xml"
# O retry só vale para falhas de rede (conexão recusada ou timeout), que são
# instabilidade da API pública. Falha de asserção ou de schema nunca é
# repetida, para que um bug intermitente não passe na segunda tentativa.
only_rerun = ["^(ConnectionError|ConnectTimeout|ReadTimeout):"]
# Os marcadores TC-XXX são registrados no conftest.py, a partir das tags dos
# arquivos .feature. Com --strict-markers, uma tag com erro de digitação
# quebra a coleta em vez de virar só um aviso.
markers = [
"smoke: fluxos ponta-a-ponta mais críticos (pytest -m smoke)",
]
[tool.ruff]
line-length = 120
target-version = "py312"
extend-exclude = ["reports"]
[tool.ruff.lint]
select = ["E", "F", "I", "UP", "B"]
[tool.mypy]
python_version = "3.12"
strict = true
ignore_missing_imports = true
exclude = ["reports"]
[tool.coverage.run]
branch = true
[tool.coverage.report]
exclude_lines = ["pragma: no cover", "if TYPE_CHECKING:"]