# Testing signals — pydantic/pydantic-settings

> Canonical page: https://codevetter.com/unpack/pydantic-settings/testing-signals

# Testing signals — pydantic/pydantic-settings

Scanned commit 5927b441848c330853eac74c82358bc283cd3640 (2026-10-02). Generated by codevetter codevetter 1.15.0 on 2026-10-02.

Source inspection; upstream code and tests were not executed.

Tests and CI were inspected, not executed, so this report contains no passing-test or measured-coverage result. Pytest tests cover precedence, aliases, CLI execution and round trips, caching, files, and mocked cloud behavior. CI specifies a cross-platform Python matrix and combined coverage gates. Inspection is bounded, and mocked providers, platform skips, and coverage exclusions limit what those checks establish.
- Pytest discovers tests under tests, treats warnings as errors with explicit exceptions, and is run by make test through uv run coverage run -m pytest --durations=10; these commands were inspected, not executed. — [pyproject.toml#L77-L94](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pyproject.toml#L77-L94) [Makefile#L27-L29](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/Makefile#L27-L29)
- test_precedence_and_merging.py asserts init > environment > dotenv > secrets > defaults, nested merge preservation, and custom environment-first ordering with AliasChoices/AliasGenerator. — [tests/test_precedence_and_merging.py#L27-L81](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_precedence_and_merging.py#L27-L81) [tests/test_precedence_and_merging.py#L84-L120](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_precedence_and_merging.py#L84-L120) [tests/test_precedence_and_merging.py#L123-L165](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_precedence_and_merging.py#L123-L165)
- Cache tests assert identity reuse, exact-class invalidation, single construction across eight threads, cross-thread nested loading, concurrent unrelated classes, collection after clearing, and retry after failed validation. — [tests/test_settings.py#L121-L176](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_settings.py#L121-L176) [tests/test_settings.py#L179-L258](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_settings.py#L179-L258)
- CLI tests exercise subcommand dispatch and alternate handlers, async handlers with and without a running loop, worker-thread exception propagation, and serialize/parse round trips for list and dictionary styles. — [tests/test_source_cli.py#L3246-L3328](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_cli.py#L3246-L3328) [tests/test_source_cli.py#L4126-L4161](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_cli.py#L4126-L4161)
- Nested-secret regressions assert external directory/file symlinks do not populate settings; JSON tests distinguish shallow/deep multi-file merging, and fixtures simulate non-UTF-8 default decoding. — [tests/test_source_nested_secrets.py#L201-L256](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_nested_secrets.py#L201-L256) [tests/test_source_json.py#L136-L165](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_json.py#L136-L165) [tests/conftest.py#L75-L104](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/conftest.py#L75-L104)
- Inspected AWS tests use moto and optional-dependency skips, while Azure and GCP tests mock SDK operations; these fixtures establish intended local behavior without demonstrating live IAM, endpoint, or service compatibility. — [tests/test_source_aws_secrets_manager.py#L38-L89](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_aws_secrets_manager.py#L38-L89) [tests/test_source_aws_systems_manager.py#L34-L44](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_aws_systems_manager.py#L34-L44) [tests/test_source_azure_key_vault.py#L26-L78](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_azure_key_vault.py#L26-L78) [tests/test_source_gcp_secret_manager.py#L28-L84](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_source_gcp_secret_manager.py#L28-L84)
- Documentation examples use pytest-examples for linting and execution expectations, but skip unsupported platforms/implementations, honor per-example skip/version requirements, and can mark expected failures. — [tests/test_docs.py#L16-L23](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_docs.py#L16-L23) [tests/test_docs.py#L61-L95](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_docs.py#L61-L95) [tests/test_docs.py#L100-L120](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/tests/test_docs.py#L100-L120)
- Inspected CI specifies Python 3.10–3.14 across Linux/macOS/Windows, repeats tests after uninstalling PyYAML, combines branch coverage, and requires 98% overall/100% library coverage; configured exclusions and matrix aggregation prevent interpreting these gates as exhaustive single-platform verification. — [.github/workflows/ci.yml#L40-L84](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/.github/workflows/ci.yml#L40-L84) [.github/workflows/ci.yml#L113-L146](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/.github/workflows/ci.yml#L113-L146) [pyproject.toml#L97-L129](https://github.com/pydantic/pydantic-settings/blob/5927b441848c330853eac74c82358bc283cd3640/pyproject.toml#L97-L129)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
