Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a5cf7d0

Browse files
committed
Merge pull request #270 from pre-commit/tmpdir_factory_to_tempdir_factory
git grep -l tmpdir_factory | xargs sed -i 's/tmpdir_factory/tempdir_factory/g'
2 parents 5791d84 + 1dfcf10 commit a5cf7d0

14 files changed

Lines changed: 199 additions & 199 deletions

requirements-dev.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ coverage
55
flake8
66
mock
77
pylint<1.4
8-
pytest<2.8
8+
pytest

testing/fixtures.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
from testing.util import get_resource_path
2020

2121

22-
def git_dir(tmpdir_factory):
23-
path = tmpdir_factory.get()
22+
def git_dir(tempdir_factory):
23+
path = tempdir_factory.get()
2424
with cwd(path):
2525
cmd_output('git', 'init')
2626
return path
2727

2828

29-
def make_repo(tmpdir_factory, repo_source):
30-
path = git_dir(tmpdir_factory)
29+
def make_repo(tempdir_factory, repo_source):
30+
path = git_dir(tempdir_factory)
3131
copy_tree_to_path(get_resource_path(repo_source), path)
3232
with cwd(path):
3333
cmd_output('git', 'add', '.')
@@ -83,8 +83,8 @@ def add_config_to_repo(git_path, config):
8383
return git_path
8484

8585

86-
def make_consuming_repo(tmpdir_factory, repo_source):
87-
path = make_repo(tmpdir_factory, repo_source)
86+
def make_consuming_repo(tempdir_factory, repo_source):
87+
path = make_repo(tempdir_factory, repo_source)
8888
config = make_config_from_repo(path)
89-
git_path = git_dir(tmpdir_factory)
89+
git_path = git_dir(tempdir_factory)
9090
return add_config_to_repo(git_path, config)

tests/commands/autoupdate_test.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626

2727
@pytest.yield_fixture
28-
def up_to_date_repo(tmpdir_factory):
29-
yield make_repo(tmpdir_factory, 'python_hooks_repo')
28+
def up_to_date_repo(tempdir_factory):
29+
yield make_repo(tempdir_factory, 'python_hooks_repo')
3030

3131

3232
def test_up_to_date_repo(up_to_date_repo, runner_with_mocked_store):
@@ -53,8 +53,8 @@ def test_autoupdate_up_to_date_repo(
5353

5454

5555
@pytest.yield_fixture
56-
def out_of_date_repo(tmpdir_factory):
57-
path = make_repo(tmpdir_factory, 'python_hooks_repo')
56+
def out_of_date_repo(tempdir_factory):
57+
path = make_repo(tempdir_factory, 'python_hooks_repo')
5858
original_sha = get_head_sha(path)
5959

6060
# Make a commit
@@ -97,8 +97,8 @@ def test_autoupdate_out_of_date_repo(
9797

9898

9999
@pytest.yield_fixture
100-
def hook_disappearing_repo(tmpdir_factory):
101-
path = make_repo(tmpdir_factory, 'python_hooks_repo')
100+
def hook_disappearing_repo(tempdir_factory):
101+
path = make_repo(tempdir_factory, 'python_hooks_repo')
102102
original_sha = get_head_sha(path)
103103

104104
with cwd(path):
@@ -143,8 +143,8 @@ def test_autoupdate_hook_disappearing_repo(
143143
assert before == after
144144

145145

146-
def test_autoupdate_local_hooks(tmpdir_factory):
147-
git_path = git_dir(tmpdir_factory)
146+
def test_autoupdate_local_hooks(tempdir_factory):
147+
git_path = git_dir(tempdir_factory)
148148
config = config_with_local_hooks()
149149
path = add_config_to_repo(git_path, config)
150150
runner = Runner(path)

0 commit comments

Comments
 (0)