MCPcopy Create free account
hub / github.com/commitizen-tools/commitizen / check_pre_commit_config

Function check_pre_commit_config

tests/commands/test_init_command.py:169–176  ·  view source on GitHub ↗

Check the content of pre-commit config is as expected

(expected: list[dict[str, Any]])

Source from the content-addressed store, hash-verified

167
168
169def check_pre_commit_config(expected: list[dict[str, Any]]):
170 """
171 Check the content of pre-commit config is as expected
172 """
173 pre_commit_config_data = yaml.safe_load(
174 Path(pre_commit_config_filename).read_text(encoding="utf-8")
175 )
176 assert pre_commit_config_data == {"repos": expected}
177
178
179@pytest.mark.usefixtures("pre_commit_installed")

Calls

no outgoing calls

Tested by

no test coverage detected