Replace calls to touch with open(..., 'a').close()

This commit is contained in:
Anthony Sottile 2017-07-08 15:43:36 -07:00
parent f33a254dd8
commit a4da7b8c8c
4 changed files with 6 additions and 6 deletions

View file

@ -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')