pre-commit-hooks/tests/conftest.py

13 lines
242 B
Python
Raw Permalink Normal View History

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