mirror of
https://github.com/pre-commit/pre-commit-hooks.git
synced 2026-04-11 05:44:16 +00:00
Merge pull request #259 from pre-commit/all-repos_autofix_all-repos-sed
Replace deprecated yield_fixture with fixture
This commit is contained in:
commit
e19917ae62
3 changed files with 4 additions and 4 deletions
|
|
@ -12,7 +12,7 @@ from testing.util import get_resource_path
|
||||||
from testing.util import write_file
|
from testing.util import write_file
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def f1_is_a_conflict_file(tmpdir):
|
def f1_is_a_conflict_file(tmpdir):
|
||||||
# Make a merge conflict
|
# Make a merge conflict
|
||||||
repo1 = tmpdir.join('repo1')
|
repo1 = tmpdir.join('repo1')
|
||||||
|
|
@ -67,7 +67,7 @@ def f1_is_a_conflict_file(tmpdir):
|
||||||
yield
|
yield
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def repository_is_pending_merge(tmpdir):
|
def repository_is_pending_merge(tmpdir):
|
||||||
# Make a (non-conflicting) merge
|
# Make a (non-conflicting) merge
|
||||||
repo1 = tmpdir.join('repo1')
|
repo1 = tmpdir.join('repo1')
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import pytest
|
||||||
from pre_commit_hooks.util import cmd_output
|
from pre_commit_hooks.util import cmd_output
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def temp_git_dir(tmpdir):
|
def temp_git_dir(tmpdir):
|
||||||
git_dir = tmpdir.join('gits')
|
git_dir = tmpdir.join('gits')
|
||||||
cmd_output('git', 'init', '--', git_dir.strpath)
|
cmd_output('git', 'init', '--', git_dir.strpath)
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ from pre_commit.util import cmd_output
|
||||||
from pre_commit_hooks.forbid_new_submodules import main
|
from pre_commit_hooks.forbid_new_submodules import main
|
||||||
|
|
||||||
|
|
||||||
@pytest.yield_fixture
|
@pytest.fixture
|
||||||
def git_dir_with_git_dir(tmpdir):
|
def git_dir_with_git_dir(tmpdir):
|
||||||
with tmpdir.as_cwd():
|
with tmpdir.as_cwd():
|
||||||
cmd_output('git', 'init', '.')
|
cmd_output('git', 'init', '.')
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue