2022-01-16 08:24:05 +08:00
|
|
|
from __future__ import annotations
|
|
|
|
|
2015-01-08 06:07:32 +08:00
|
|
|
import pytest
|
2015-03-21 04:52:21 +08:00
|
|
|
|
|
|
|
from pre_commit_hooks.util import cmd_output
|
2015-01-08 06:07:32 +08:00
|
|
|
|
|
|
|
|
2018-01-22 07:31:23 +08:00
|
|
|
@pytest.fixture
|
2015-01-08 06:07:32 +08:00
|
|
|
def temp_git_dir(tmpdir):
|
2016-05-28 05:09:50 +08:00
|
|
|
git_dir = tmpdir.join('gits')
|
2020-05-21 00:07:45 +08:00
|
|
|
cmd_output('git', 'init', '--', str(git_dir))
|
2015-01-08 06:07:32 +08:00
|
|
|
yield git_dir
|