mirror of
https://git.datalinker.icu/ltdrdata/ComfyUI-Manager
synced 2025-12-08 21:54:26 +08:00
- Add MockTaskQueue class with dependency injection for isolated testing - Test core operations: queueing, processing, batch tracking, state management - Test thread safety: concurrent access, worker lifecycle, exception handling - Test integration workflows: full task processing with WebSocket updates - Test edge cases: empty queues, invalid data, cleanup scenarios - Solve heapq compatibility by wrapping items in priority tuples - Include pytest configuration and test runner script - All 15 tests passing with proper async/threading support Testing covers: ✅ Task queueing with Pydantic validation ✅ Batch history tracking and persistence ✅ Thread-safe concurrent operations ✅ Worker thread lifecycle management ✅ WebSocket message delivery tracking ✅ State snapshots and error conditions
13 lines
305 B
INI
13 lines
305 B
INI
[tool:pytest]
|
|
testpaths = tests
|
|
python_files = test_*.py
|
|
python_classes = Test*
|
|
python_functions = test_*
|
|
addopts =
|
|
-v
|
|
--tb=short
|
|
--strict-markers
|
|
--disable-warnings
|
|
markers =
|
|
slow: marks tests as slow (deselect with '-m "not slow"')
|
|
integration: marks tests as integration tests |