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

Skip to content

Commit ab47d08

Browse files
committed
Make regression test that ensures autoupdate foo keeps everything else
1 parent 0900304 commit ab47d08

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

tests/commands/autoupdate_test.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,12 @@ def test_autoupdate_out_of_date_repo(
127127
def test_autoupdate_out_of_date_repo_with_correct_repo_name(
128128
out_of_date_repo, in_tmpdir, mock_out_store_directory,
129129
):
130-
# Write out the config
131-
config = make_config_from_repo(
130+
stale_config = make_config_from_repo(
132131
out_of_date_repo.path, sha=out_of_date_repo.original_sha, check=False,
133132
)
133+
local_config = config_with_local_hooks()
134+
config = {'repos': [stale_config, local_config]}
135+
# Write out the config
134136
write_config('.', config)
135137

136138
runner = Runner('.', C.CONFIG_FILE)
@@ -141,6 +143,7 @@ def test_autoupdate_out_of_date_repo_with_correct_repo_name(
141143
assert ret == 0
142144
assert before != after
143145
assert out_of_date_repo.head_sha in after
146+
assert local_config['repo'] in after
144147

145148

146149
def test_autoupdate_out_of_date_repo_with_wrong_repo_name(

0 commit comments

Comments
 (0)