Files
TimeTracker/pytest.ini
Dries Peeters 90dde470da style: standardize code formatting and normalize line endings
- Normalize line endings from CRLF to LF across all files to match .editorconfig
- Standardize quote style from single quotes to double quotes
- Normalize whitespace and formatting throughout codebase
- Apply consistent code style across 372 files including:
  * Application code (models, routes, services, utils)
  * Test files
  * Configuration files
  * CI/CD workflows

This ensures consistency with the project's .editorconfig settings and
improves code maintainability.
2025-11-28 20:05:37 +01:00

75 lines
2.0 KiB
INI

[pytest]
# Pytest configuration for TimeTracker
# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Test paths
testpaths = tests
# Output options
addopts =
# Verbosity and output
-v
--tb=short
--strict-markers
--color=yes
# Warnings
-W ignore::DeprecationWarning
-W ignore::PendingDeprecationWarning
# Performance optimizations
--durations=20
# Show slowest tests for optimization
# Note: Parallel execution (-n auto) should be added via command line or CI
# This allows flexibility: use -n auto for speed, omit for debugging
# Note: Coverage fail-under should only be used when running ALL tests
# Do NOT use --cov-fail-under when running specific test markers (e.g., -m routes)
# Test markers for different test levels
markers =
smoke: Quick smoke tests (fastest, runs on every commit)
unit: Unit tests (fast, isolated tests)
integration: Integration tests (medium speed, tests component interaction)
api: API endpoint tests
database: Database-related tests
models: Model tests
routes: Route/endpoint tests
utils: Utility/helper function tests
security: Security-related tests
invoices: Invoice-related tests
admin: Admin panel and settings tests
templates: Template and template filter tests
performance: Performance and load tests
slow: Slow running tests
requires_db: Tests that require database connection
requires_network: Tests that require network access
skip_ci: Tests to skip in CI environment
error_handling: Error handling and exception tests
onboarding: Onboarding and user setup tests
# Coverage configuration
[coverage:run]
source = app
omit =
*/tests/*
*/test_*.py
*/__pycache__/*
*/venv/*
*/env/*
app/utils/pdf_generator.py
app/utils/pdf_generator_fallback.py
[coverage:report]
precision = 2
show_missing = True
skip_covered = False
[coverage:html]
directory = htmlcov