mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-19 17:14:43 +04:00
Move empty_git_dir out of pytest fixtures.
This commit is contained in:
parent
7b1230df27
commit
047a933554
10 changed files with 159 additions and 99 deletions
|
|
@ -75,7 +75,7 @@ def out_of_date_repo(python_hooks_repo):
|
|||
config_wrapped = apply_defaults([config], CONFIG_JSON_SCHEMA)
|
||||
validate_config_extra(config_wrapped)
|
||||
config = config_wrapped[0]
|
||||
local['git']('commit', '--allow-empty', '-m', 'foo')
|
||||
local['git']['commit', '--allow-empty', '-m', 'foo']()
|
||||
head_sha = get_head_sha(python_hooks_repo)
|
||||
|
||||
with open(os.path.join(python_hooks_repo, C.CONFIG_FILE), 'w') as file_obj:
|
||||
|
|
@ -125,8 +125,8 @@ def hook_disappearing_repo(python_hooks_repo):
|
|||
get_resource_path('manifest_without_foo.yaml'),
|
||||
C.MANIFEST_FILE,
|
||||
)
|
||||
local['git']('add', '.')
|
||||
local['git']('commit', '-m', 'Remove foo')
|
||||
local['git']['add', '.']()
|
||||
local['git']['commit', '-m', 'Remove foo']()
|
||||
|
||||
with open(os.path.join(python_hooks_repo, C.CONFIG_FILE), 'w') as file_obj:
|
||||
file_obj.write(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue