mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +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
14
testing/fixtures.py
Normal file
14
testing/fixtures.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from __future__ import absolute_import
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from plumbum import local
|
||||
|
||||
|
||||
git = local['git']
|
||||
|
||||
|
||||
def git_dir(tmpdir_factory):
|
||||
path = tmpdir_factory.get()
|
||||
with local.cwd(path):
|
||||
git('init')
|
||||
return path
|
||||
Loading…
Add table
Add a link
Reference in a new issue