blob: 807f15b86bb939ebb40f565d264d9ae6b0ef3979 [file] [log] [blame]
Anthony Sottile8f615292022-01-15 19:24:05 -05001from __future__ import annotations
2
gkiselc682b502015-01-07 14:07:32 -08003import pytest
Anthony Sottile713fab42015-03-20 13:52:21 -07004
5from pre_commit_hooks.util import cmd_output
gkiselc682b502015-01-07 14:07:32 -08006
7
Anthony Sottile4ab79142018-01-21 15:31:23 -08008@pytest.fixture
gkiselc682b502015-01-07 14:07:32 -08009def temp_git_dir(tmpdir):
Anthony Sottilea99475a2016-05-27 14:09:50 -070010 git_dir = tmpdir.join('gits')
Max Rozentsveygf35bfed2020-05-20 12:07:45 -040011 cmd_output('git', 'init', '--', str(git_dir))
gkiselc682b502015-01-07 14:07:32 -080012 yield git_dir