Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8abfb37

Browse files
authored
Merge pull request #712 from pre-commit/dont_write_to_homedir_under_test
Don't write to the home directory under test
2 parents 29715c9 + d7a41d8 commit 8abfb37

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/commands/install_uninstall_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,11 +187,14 @@ def test_unicode_merge_commit_message(tempdir_factory):
187187
with cwd(path):
188188
assert install(Runner(path, C.CONFIG_FILE)) == 0
189189
cmd_output('git', 'checkout', 'master', '-b', 'foo')
190-
cmd_output('git', 'commit', '--allow-empty', '-m', 'branch2')
190+
cmd_output('git', 'commit', '--allow-empty', '-n', '-m', 'branch2')
191191
cmd_output('git', 'checkout', 'master')
192192
cmd_output('git', 'merge', 'foo', '--no-ff', '--no-commit', '-m', '☃')
193193
# Used to crash
194-
cmd_output('git', 'commit', '--no-edit')
194+
cmd_output_mocked_pre_commit_home(
195+
'git', 'commit', '--no-edit',
196+
tempdir_factory=tempdir_factory,
197+
)
195198

196199

197200
def test_install_idempotent(tempdir_factory):

0 commit comments

Comments
 (0)