ComfyUI-Manager/tests/common/pip_util/pytest.ini
Dr.Lt.Data 2866193baf ● feat: Draft pip package policy management system (not yet integrated)
Add comprehensive pip dependency conflict resolution framework as draft implementation. This is self-contained and does not affect existing
ComfyUI Manager functionality.

Key components:
- pip_util.py with PipBatch class for policy-driven package management
- Lazy-loaded policy system supporting base + user overrides
- Multi-stage policy execution (uninstall → apply_first_match → apply_all_matches → restore)
- Conditional policies based on platform, installed packages, and ComfyUI version
- Comprehensive test suite covering edge cases, workflows, and platform scenarios
- Design and implementation documentation

Policy capabilities (draft):
- Package replacement (e.g., PIL → Pillow, opencv-python → opencv-contrib-python)
- Version pinning to prevent dependency conflicts
- Dependency protection during installations
- Platform-specific handling (Linux/Windows, GPU detection)
- Pre-removal and post-restoration workflows

Testing infrastructure:
- Pytest-based test suite with isolated environments
- Dependency analysis tools for conflict detection
- Coverage for policy priority, edge cases, and environment recovery

Status: Draft implementation complete, integration with manager workflows pending.
2025-10-04 08:55:59 +09:00

53 lines
1.2 KiB
INI

[pytest]
# pytest configuration for pip_util.py tests
# Test discovery
testpaths = .
# Markers
markers =
unit: Unit tests for individual functions
integration: Integration tests for workflows
e2e: End-to-end tests for complete scenarios
# Output options - extend global config
addopts =
# Coverage options for pip_util
--cov=../../../comfyui_manager/common/pip_util
--cov-report=html:htmlcov_pip_util
--cov-report=term-missing
--cov-report=xml:coverage_pip_util.xml
# Coverage fail threshold
--cov-fail-under=80
# Coverage configuration
[coverage:run]
source = ../../../comfyui_manager/common
omit =
*/tests/*
*/test_*.py
*/__pycache__/*
*/test_venv/*
[coverage:report]
precision = 2
show_missing = True
skip_covered = False
exclude_lines =
# Standard pragma
pragma: no cover
# Don't complain about missing debug code
def __repr__
# Don't complain if tests don't hit defensive assertion code
raise AssertionError
raise NotImplementedError
# Don't complain if non-runnable code isn't run
if __name__ == .__main__.:
# Don't complain about abstract methods
@abstractmethod
[coverage:html]
directory = htmlcov