Check the content of commitizen config is as expected
(config_filepath: str)
| 154 | |
| 155 | |
| 156 | def check_cz_config(config_filepath: str): |
| 157 | """ |
| 158 | Check the content of commitizen config is as expected |
| 159 | """ |
| 160 | content = Path(config_filepath).read_text(encoding="utf-8") |
| 161 | if "json" in config_filepath: |
| 162 | assert json.loads(content) == EXPECTED_DICT_CONFIG |
| 163 | elif "yaml" in config_filepath: |
| 164 | assert yaml.load(content, Loader=yaml.FullLoader) == EXPECTED_DICT_CONFIG |
| 165 | else: |
| 166 | assert content == expected_config |
| 167 | |
| 168 | |
| 169 | def check_pre_commit_config(expected: list[dict[str, Any]]): |
no outgoing calls
no test coverage detected