mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-06 03:56:54 +00:00
Simplify the tests
This commit is contained in:
parent
b64436cdda
commit
a99475afa0
14 changed files with 144 additions and 201 deletions
|
|
@ -5,17 +5,10 @@ from __future__ import unicode_literals
|
|||
import pytest
|
||||
|
||||
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
|
||||
cmd_output('git', 'init', git_dir)
|
||||
git_dir = tmpdir.join('gits')
|
||||
cmd_output('git', 'init', git_dir.strpath)
|
||||
yield git_dir
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue