Skip to content

Commit e19917a

Browse files
authored
Merge pull request #259 from pre-commit/all-repos_autofix_all-repos-sed
Replace deprecated yield_fixture with fixture
2 parents 0ddb3b8 + 4ab7914 commit e19917a

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

tests/check_merge_conflict_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from testing.util import write_file
1313

1414

15-
@pytest.yield_fixture
15+
@pytest.fixture
1616
def f1_is_a_conflict_file(tmpdir):
1717
# Make a merge conflict
1818
repo1 = tmpdir.join('repo1')
@@ -67,7 +67,7 @@ def f1_is_a_conflict_file(tmpdir):
6767
yield
6868

6969

70-
@pytest.yield_fixture
70+
@pytest.fixture
7171
def repository_is_pending_merge(tmpdir):
7272
# Make a (non-conflicting) merge
7373
repo1 = tmpdir.join('repo1')

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pre_commit_hooks.util import cmd_output
88

99

10-
@pytest.yield_fixture
10+
@pytest.fixture
1111
def temp_git_dir(tmpdir):
1212
git_dir = tmpdir.join('gits')
1313
cmd_output('git', 'init', '--', git_dir.strpath)

tests/forbid_new_submodules_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from pre_commit_hooks.forbid_new_submodules import main
77

88

9-
@pytest.yield_fixture
9+
@pytest.fixture
1010
def git_dir_with_git_dir(tmpdir):
1111
with tmpdir.as_cwd():
1212
cmd_output('git', 'init', '.')

0 commit comments

Comments
 (0)