Skip to content

gh-7: Test configuration layer precedence and file loading - #443

Open
JunaidAhamed-7777 wants to merge 1 commit into
python:mainfrom
JunaidAhamed-7777:test-config-layer-precedence
Open

JunaidAhamed-7777 wants to merge 1 commit into
python:mainfrom
JunaidAhamed-7777:test-config-layer-precedence

Conversation

@JunaidAhamed-7777

Copy link
Copy Markdown

Refs #7

Add tests for how PyManager loads settings from multiple config files. They check that the registry takes precedence over file layers and that an explicit override wins last. They also cover missing or malformed files, UTF-8 files with a BOM, and paths relative to the config file rather than the current directory.

The tests use temporary JSON files and mock the global config and registry loaders. No production code changes.

Validation: python -m pytest tests/test_config.py on Windows with Python 3.14.7: 74 passed, up from 67. The new tests caught six deliberately introduced loader regressions. Ruff and git diff --check passed.

@zooba

zooba commented Nov 18, 2026

Copy link
Copy Markdown
Member

Thanks, this looks great! Did you have anything else to add, or am I good to merge?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants