1
0
Fork 0
mirror of synced 2024-12-22 06:31:07 -05:00

Fix typo in test (can_upgraded_... -> can_upgrade_...)

This commit is contained in:
Erik Flodin 2021-01-17 19:07:36 +01:00
parent a5b1067e02
commit 990b4ce119
No known key found for this signature in database
GPG key ID: 420A7C865EE3F85F

View file

@ -53,8 +53,8 @@ def test_upgrade(tmpdir, runner, versions, submodule):
if submodule: if submodule:
# When upgrading via 2.5.0 we can't have a submodule that's been added # When upgrading via 2.5.0 we can't have a submodule that's been added
# after being cloned as 2.5.0 fails the upgrade in that case. # after being cloned as 2.5.0 fails the upgrade in that case.
can_upgraded_cloned_submodule = '2.5.0' not in versions[1:] can_upgrade_cloned_submodule = '2.5.0' not in versions[1:]
if can_upgraded_cloned_submodule: if can_upgrade_cloned_submodule:
# Check out a repo and then add it as a submodule # Check out a repo and then add it as a submodule
run = runner(['git', '-C', str(home), 'clone', str(ext_repo), 'b']) run = runner(['git', '-C', str(home), 'clone', str(ext_repo), 'b'])
assert run.success assert run.success
@ -92,7 +92,7 @@ def test_upgrade(tmpdir, runner, versions, submodule):
run = run_version(version, 'upgrade', check_stderr=not submodule) run = run_version(version, 'upgrade', check_stderr=not submodule)
if submodule: if submodule:
lines = run.err.splitlines() lines = run.err.splitlines()
if can_upgraded_cloned_submodule: if can_upgrade_cloned_submodule:
assert 'Migrating git directory of' in lines[0] assert 'Migrating git directory of' in lines[0]
assert str(home.join('b/.git')) in lines[1] assert str(home.join('b/.git')) in lines[1]
assert str(yadm_dir.join('repo.git/modules/b')) in lines[2] assert str(yadm_dir.join('repo.git/modules/b')) in lines[2]
@ -108,7 +108,7 @@ def test_upgrade(tmpdir, runner, versions, submodule):
assert run.out == 'some data' assert run.out == 'some data'
if submodule: if submodule:
if can_upgraded_cloned_submodule: if can_upgrade_cloned_submodule:
assert home.join('b/afile').read() == 'some data' assert home.join('b/afile').read() == 'some data'
assert home.join('a/afile').read() == 'some data' assert home.join('a/afile').read() == 'some data'
assert home.join('c/afile').read() == 'some data' assert home.join('c/afile').read() == 'some data'