commit:     82823b0c4de0a7cbb5654bb19d63aef874800afd
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul  5 10:18:55 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul  5 10:19:23 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=82823b0c

test_sync_local: fix GitSync coverage

Fixes: 0655b4a26e37 ("test_sync_local: add test for auto-sync set to 'no'")

 pym/portage/tests/sync/test_sync_local.py | 15 +++++++++------
 1 file 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 + \

Reply via email to