mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Keep original test as is, for real
This commit is contained in:
parent
e5b8cb0f70
commit
70e7d9c5c4
1 changed files with 1 additions and 4 deletions
|
|
@ -114,10 +114,8 @@ def test_autoupdate_out_of_date_repo(
|
||||||
)
|
)
|
||||||
write_config('.', config)
|
write_config('.', config)
|
||||||
|
|
||||||
runner = Runner('.', C.CONFIG_FILE)
|
|
||||||
before = open(C.CONFIG_FILE).read()
|
before = open(C.CONFIG_FILE).read()
|
||||||
# It will update the repo, because the name matches
|
ret = autoupdate(Runner('.', C.CONFIG_FILE), tags_only=False)
|
||||||
ret = autoupdate(runner, tags_only=False)
|
|
||||||
after = open(C.CONFIG_FILE).read()
|
after = open(C.CONFIG_FILE).read()
|
||||||
assert ret == 0
|
assert ret == 0
|
||||||
assert before != after
|
assert before != after
|
||||||
|
|
@ -137,7 +135,6 @@ def test_autoupdate_out_of_date_repo_with_correct_repo_name(
|
||||||
runner = Runner('.', C.CONFIG_FILE)
|
runner = Runner('.', C.CONFIG_FILE)
|
||||||
before = open(C.CONFIG_FILE).read()
|
before = open(C.CONFIG_FILE).read()
|
||||||
repo_name = 'file://{}'.format(out_of_date_repo.path)
|
repo_name = 'file://{}'.format(out_of_date_repo.path)
|
||||||
# It will update the repo, because the name matches
|
|
||||||
ret = autoupdate(runner, tags_only=False, repo=repo_name)
|
ret = autoupdate(runner, tags_only=False, repo=repo_name)
|
||||||
after = open(C.CONFIG_FILE).read()
|
after = open(C.CONFIG_FILE).read()
|
||||||
assert ret == 0
|
assert ret == 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue