diff options
author | Zac Medico <zmedico@gentoo.org> | 2018-07-05 03:18:55 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2018-07-05 03:19:23 -0700 |
commit | 82823b0c4de0a7cbb5654bb19d63aef874800afd (patch) | |
tree | ff33e4abe6266eba73fe92918ab4c8a126f1064b | |
parent | depgraph._show_unsatisfied_blockers: AttributeError unevaluated_atom (bug 659... (diff) | |
download | portage-82823b0c.tar.gz portage-82823b0c.tar.bz2 portage-82823b0c.zip |
test_sync_local: fix GitSync coverage
Fixes: 0655b4a26e37 ("test_sync_local: add test for auto-sync set to 'no'")
-rw-r--r-- | pym/portage/tests/sync/test_sync_local.py | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/pym/portage/tests/sync/test_sync_local.py b/pym/portage/tests/sync/test_sync_local.py index 010c8f887..17ff6f200 100644 --- a/pym/portage/tests/sync/test_sync_local.py +++ b/pym/portage/tests/sync/test_sync_local.py @@ -102,17 +102,20 @@ class SyncLocalTestCase(TestCase): os.unlink(os.path.join(metadata_dir, 'timestamp.chk')) sync_cmds = ( + (homedir, cmds["emerge"] + ("--sync",)), + (homedir, lambda: self.assertTrue(os.path.exists( + os.path.join(repo.location, "dev-libs", "A") + ), "dev-libs/A expected, but missing")), + (homedir, cmds["emaint"] + ("sync", "-A")), + ) + + sync_cmds_auto_sync = ( (homedir, lambda: repos_set_conf("rsync", auto_sync="no")), (homedir, cmds["emerge"] + ("--sync",)), (homedir, lambda: self.assertFalse(os.path.exists( os.path.join(repo.location, "dev-libs", "A") ), "dev-libs/A found, expected missing")), (homedir, lambda: repos_set_conf("rsync", auto_sync="yes")), - (homedir, cmds["emerge"] + ("--sync",)), - (homedir, lambda: self.assertTrue(os.path.exists( - os.path.join(repo.location, "dev-libs", "A") - ), "dev-libs/A expected, but missing")), - (homedir, cmds["emaint"] + ("sync", "-A")), ) rename_repo = ( @@ -236,7 +239,7 @@ class SyncLocalTestCase(TestCase): # triggered by python -Wd will be visible. stdout = subprocess.PIPE - for cwd, cmd in rename_repo + sync_cmds + \ + for cwd, cmd in rename_repo + sync_cmds_auto_sync + sync_cmds + \ rsync_opts_repos + rsync_opts_repos_default + \ rsync_opts_repos_default_ovr + rsync_opts_repos_default_cancel + \ delete_sync_repo + git_repo_create + sync_type_git + \ |