mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 20:16:53 +00:00
Remove dependency on plumbum
This commit is contained in:
parent
c9b6161fab
commit
713fab4bc7
12 changed files with 99 additions and 55 deletions
|
|
@ -3,11 +3,19 @@ from __future__ import print_function
|
|||
from __future__ import unicode_literals
|
||||
|
||||
import pytest
|
||||
from plumbum import local
|
||||
|
||||
from pre_commit_hooks.util import cmd_output
|
||||
from testing.util import cwd
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def in_tmpdir(tmpdir):
|
||||
with cwd(tmpdir.strpath):
|
||||
yield tmpdir
|
||||
|
||||
|
||||
@pytest.yield_fixture
|
||||
def temp_git_dir(tmpdir):
|
||||
git_dir = tmpdir.join('gits').strpath
|
||||
local['git']('init', git_dir)
|
||||
cmd_output('git', 'init', git_dir)
|
||||
yield git_dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue