mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Replace calls to touch with open(..., 'a').close()
This commit is contained in:
parent
f33a254dd8
commit
a4da7b8c8c
4 changed files with 6 additions and 6 deletions
|
|
@ -20,13 +20,13 @@ def test_make_archive(tempdir_factory):
|
|||
git_path = git_dir(tempdir_factory)
|
||||
# Add a files to the git directory
|
||||
with cwd(git_path):
|
||||
cmd_output('touch', 'foo')
|
||||
open('foo', 'a').close()
|
||||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '-m', 'foo')
|
||||
# We'll use this sha
|
||||
head_sha = get_head_sha('.')
|
||||
# And check that this file doesn't exist
|
||||
cmd_output('touch', 'bar')
|
||||
open('bar', 'a').close()
|
||||
cmd_output('git', 'add', '.')
|
||||
cmd_output('git', 'commit', '-m', 'bar')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue