Simplify the tests

This commit is contained in:
Anthony Sottile 2016-05-27 14:09:50 -07:00
parent b64436cdda
commit a99475afa0
14 changed files with 144 additions and 201 deletions

View file

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