Skip to content

test: add coverage for config_manager and env_checker#390

Merged
bigcat88 merged 1 commit intomainfrom
test/config-manager-env-checker-coverage
Mar 27, 2026
Merged

test: add coverage for config_manager and env_checker#390
bigcat88 merged 1 commit intomainfrom
test/config-manager-env-checker-coverage

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

Both config_manager.py and env_checker.py had zero unit test coverage. This adds 58 tests across two new files covering all public methods.

test_config_manager.py (36 tests) covers load() with background parsing and stale PID cleanup, write_config() directory creation, set()/get() round-trips, get_bool() with all accepted formats, get_or_override() priority (CLI > env > config), get_env_data() output for all config combinations, and remove_background().

test_env_checker.py (22 tests) covers format_python_version() old/modern boundary, check_comfy_server_running() with mocked requests, and EnvChecker methods including check() with virtualenv/conda detection, is_isolated_env(), get_isolated_env(), and fill_print_table().

Both modules use the @singleton decorator, so tests extract the original class from the wrapper closure to construct isolated instances backed by tmp_path.

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Mar 27, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@            Coverage Diff             @@
##             main     #390      +/-   ##
==========================================
+ Coverage   70.98%   72.59%   +1.60%     
==========================================
  Files          33       33              
  Lines        3915     3915              
==========================================
+ Hits         2779     2842      +63     
+ Misses       1136     1073      -63     

see 2 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bigcat88 bigcat88 force-pushed the test/config-manager-env-checker-coverage branch from 10ad2fc to 0219eff Compare March 27, 2026 17:20
@bigcat88 bigcat88 force-pushed the test/config-manager-env-checker-coverage branch from 0219eff to 5212da6 Compare March 27, 2026 17:27
@bigcat88 bigcat88 merged commit 38a3a9a into main Mar 27, 2026
8 checks passed
@bigcat88 bigcat88 deleted the test/config-manager-env-checker-coverage branch March 27, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant