Thanks to visit codestin.com Credit goes to github.com
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 f2be2ea commit 8a7142dCopy full SHA for 8a7142d
1 file changed
tests/commands/migrate_config_test.py
@@ -147,3 +147,12 @@ def test_migrate_config_sha_to_rev(tmpdir):
147
' rev: v1.2.0\n'
148
' hooks: []\n'
149
)
150
+
151
+@pytest.mark.parametrize('contents', ('', '\n'))
152
+def test_empty_configuration_file_user_error(tmpdir, contents):
153
+ cfg = tmpdir.join(C.CONFIG_FILE)
154
+ cfg.write(contents)
155
+ with tmpdir.as_cwd():
156
+ assert not migrate_config(C.CONFIG_FILE)
157
+ # even though the config is invalid, this should be a noop
158
+ assert cfg.read() == contents
0 commit comments