File size: 1,819 Bytes
9cf9a2a
 
 
 
 
 
 
 
 
9729782
 
 
 
 
 
 
9cf9a2a
 
 
 
 
 
 
 
 
 
 
 
 
 
0833e39
 
 
9cf9a2a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
[pytest]
# Test discovery
testpaths = tests
python_files = test_*.py
python_classes = Test*
python_functions = test_*

# Asyncio mode
asyncio_mode = auto
# Fixtures et tests partagent la meme boucle (portee fonction, le defaut).
# Forcer les fixtures en portee session les placait dans une boucle differente
# de celle des tests : les connexions asyncpg creees par les fixtures y etaient
# alors "attached to a different loop", ce qui remontait en HTTP 500 depuis les
# routes. Le moteur de base est cree par test (conftest.pg_engine) ; seule la
# migration Alembic, synchrone, reste faite une fois par session.
asyncio_default_fixture_loop_scope = function

# Timeout configuration
timeout = 300
timeout_method = thread

# Test markers
markers =
    slow: marks tests as slow (deselect with '-m "not slow"')
    integration: marks tests as integration tests
    unit: marks tests as unit tests
    api: marks tests as API tests
    services: marks tests as service tests

# Output options
# La couverture n'est PAS dans addopts : elle rendait pytest-cov obligatoire
# pour seulement lancer `pytest`. Pour un rapport de couverture :
#   pytest --cov=app --cov-report=term-missing --cov-branch
addopts =
    --verbose
    --strict-markers
    --tb=short

# Minimum coverage threshold (optional, uncomment to enforce)
# --cov-fail-under=80

# Logging
log_cli = false
log_cli_level = INFO
log_cli_format = %(asctime)s [%(levelname)8s] %(message)s
log_cli_date_format = %Y-%m-%d %H:%M:%S

# Warnings
filterwarnings =
    error
    ignore::UserWarning
    ignore::DeprecationWarning

# Coverage options
[coverage:run]
source = app
omit =
    */tests/*
    */migrations/*
    */__pycache__/*
    */site-packages/*

[coverage:report]
precision = 2
show_missing = True
skip_covered = False

[coverage:html]
directory = htmlcov