Comprehensive fix for test suite warnings across multiple issue test files: ### SQLite3 Date Adapter Warnings (Python 3.12) - Fixed 101 warnings in Issue 113 (activity_tracker.py) - Fixed 55 warnings in Issue 114 (allocation_engine.py) - Fixed 148 warnings in Issue 122 (worktime_tracker.py + test file) - Fixed 18 warnings in Issue 124 (day_wrapup_commands.py + worktime_tracker.py) ### Pytest-asyncio Configuration - Added asyncio_default_fixture_loop_scope = function to pytest.ini - Eliminates pytest-asyncio deprecation warning ### Runtime Warnings for Unawaited Coroutines - Fixed 2 warnings in Issue 59 (gitea plugin async mocking) - Enhanced AsyncTestCase with better coroutine cleanup - Improved async mock management in test utilities ### Technical Changes - Convert Python date/datetime objects to ISO strings before SQLite queries - Use .isoformat() with defensive hasattr() checks for backward compatibility - Simplified async test mocking to avoid coroutine creation - Enhanced cleanup_async_mocks() function for comprehensive cleanup ### Results - Before: ~324 warnings across test suite - After: 0 warnings - completely clean test suite - All 216+ tests pass with zero warning noise 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
32 lines
1.0 KiB
INI
32 lines
1.0 KiB
INI
[pytest]
|
|
addopts =
|
|
--strict-markers
|
|
--strict-config
|
|
--verbose
|
|
--tb=short
|
|
--durations=10
|
|
--maxfail=3
|
|
-ra
|
|
testpaths = tests
|
|
norecursedirs = .markitect_workspace .git __pycache__ .pytest_cache
|
|
asyncio_mode = auto
|
|
asyncio_default_fixture_loop_scope = function
|
|
python_files = test_*.py *_test.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
markers =
|
|
slow: marks tests as slow (deselect with '-m "not slow"')
|
|
integration: marks tests as integration tests
|
|
e2e: marks tests as end-to-end tests
|
|
performance: marks tests as performance tests
|
|
unit: marks tests as unit tests
|
|
smoke: marks tests as smoke tests for quick validation
|
|
asyncio: marks tests as async tests
|
|
timeout(seconds): marks tests with custom timeout duration
|
|
arch: marks tests as architecture tests
|
|
fast: marks tests as fast execution tests (for TDD red phase)
|
|
filterwarnings =
|
|
log_cli = true
|
|
log_cli_level = INFO
|
|
log_cli_format = %(asctime)s [%(levelname)8s] %(name)s: %(message)s
|
|
log_cli_date_format = %Y-%m-%d %H:%M:%S |