Files
KohakuHub/pytest.ini
2026-04-19 22:14:32 +08:00

65 lines
1.2 KiB
INI

[pytest]
# Pytest configuration for KohakuHub API tests
# Test discovery patterns
python_files = test_*.py
python_classes = Test*
python_functions = test_*
# Minimum version
minversion = 7.0
# Async support
asyncio_mode = auto
# Test paths
testpaths = test
# Output options
addopts =
-ra
--strict-markers
--strict-config
--showlocals
# Markers
markers =
lfs: Tests requiring LFS (large files >10MB)
slow: Slow running tests (may take >30 seconds)
repo_type: Mark test with specific repository type
integration: Tests that require real local infrastructure
# 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 (when using --cov)
[coverage:run]
source = kohakuhub
omit =
*/test/*
*/migrations/*
*/__pycache__/*
*/venv/*
*/virtualenv/*
*/old_db.py
*/old_logger.py
*/datasetviewer/*
[coverage:report]
precision = 2
show_missing = True
skip_covered = False
fail_under = 50
[coverage:html]
directory = htmlcov