Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,48 @@ testpaths = ["tests"]
python_files = ["test_*.py"]
python_classes = ["Test*"]
python_functions = ["test_*"]
# Asyncio configuration
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"
addopts = [
"-v",
"-l",
"-ra",
"--strict-markers",
"--strict-config",
"--cov=app",
"--cov-report=term-missing",
"--cov-report=html",
"--cov-branch",
"-p no:warnings",
]
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 endpoint tests",
"auth: marks tests related to authentication",
"community: marks tests related to communities",
"content: marks tests related to content management",
"publish: marks tests related to publishing",
"analytics: marks tests related to analytics",
]

[tool.coverage.run]
source = ["app"]
omit = [
"*/tests/*",
"*/migrations/*",
"*/__pycache__/*",
"*/venv/*",
"*/.venv/*",
]

[tool.coverage.report]
fail_under = 80
precision = 2
show_missing = true
skip_covered = false

[tool.coverage.html]
directory = "htmlcov"
4 changes: 4 additions & 0 deletions backend/pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ python_functions = test_*
# Test directories
testpaths = tests

# Asyncio configuration
asyncio_mode = auto
asyncio_default_fixture_loop_scope = function

# Output options
addopts =
# Verbose output
Expand Down
Loading
Loading