We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8ec67c5 commit 380f5fdCopy full SHA for 380f5fd
tests/commands/test_init_command.py
@@ -226,6 +226,19 @@ def test_pre_commit_config_yaml_without_repos(_, default_choice, tmpdir, config)
226
# Should use DEFAULT_CONFIG since the file content doesn't have 'repos' key
227
check_pre_commit_config([CZ_HOOK_CONFIG])
228
229
+ def test_pre_commit_config_yaml_not_a_dict(_, default_choice, tmpdir, config):
230
+ with tmpdir.as_cwd():
231
+ # Write a dictionary YAML content without 'repos' key
232
+ p = tmpdir.join(PRE_COMMIT_CONFIG_FILENAME)
233
+ p.write(
234
+ yaml.safe_dump(["item1", "item2"])
235
+ ) # Dictionary without 'repos' key
236
+
237
+ commands.Init(config)()
238
+ check_cz_config(default_choice)
239
+ # Should use DEFAULT_CONFIG since the file content doesn't have 'repos' key
240
+ check_pre_commit_config([CZ_HOOK_CONFIG])
241
242
def test_cz_hook_exists_in_pre_commit_config(_, default_choice, tmpdir, config):
243
with tmpdir.as_cwd():
244
p = tmpdir.join(PRE_COMMIT_CONFIG_FILENAME)
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments