diff --git a/pungi/gather_dnf.py b/pungi/gather_dnf.py index 6a959173..5fecc7f0 100644 --- a/pungi/gather_dnf.py +++ b/pungi/gather_dnf.py @@ -94,7 +94,7 @@ class GatherOptions(pungi.common.OptionsBase): "exclude_source=%s" % self.exclude_source, "exclude_debug=%s" % self.exclude_debug, ] - return "[\n%s\n]" % "\n".join(" " + l for l in lines) + return "[\n%s\n]" % "\n".join(" " + line for line in lines) class QueryCache(object): diff --git a/pungi/phases/createrepo.py b/pungi/phases/createrepo.py index d90027dc..529d31cb 100644 --- a/pungi/phases/createrepo.py +++ b/pungi/phases/createrepo.py @@ -111,7 +111,7 @@ def create_variant_repo( if variant.is_empty or (arch is None and pkg_type != "srpm"): compose.log_info( - "[SKIP ] Creating repo (arch: %s, variant: %s): %s" % (arch, variant) + "[SKIP ] Creating repo (arch: %s, variant: %s)" % (arch, variant) ) return diff --git a/tests/test_gather_phase.py b/tests/test_gather_phase.py index b56a90c9..c9b2086d 100644 --- a/tests/test_gather_phase.py +++ b/tests/test_gather_phase.py @@ -1130,27 +1130,6 @@ class TestReuseOldGatherPackages(helpers.PungiTestCase): ) self.assertEqual(result, None) - @mock.patch("pungi.phases.gather.load_old_gather_result") - @mock.patch("pungi.phases.gather.load_old_compose_config") - def test_reuse_compose_config_different( - self, load_old_compose_config, load_old_gather_result - ): - load_old_gather_result.return_value = { - "rpm": [{"path": "/build/bash-1.0.0-1.x86_64.rpm"}], - "srpm": [], - "debuginfo": [], - } - - compose = helpers.DummyCompose(self.topdir, {"gather_allow_reuse": True}) - compose_conf_copy = dict(compose.conf) - compose_conf_copy["gather_method"] = "nodeps" - load_old_compose_config.return_value = compose_conf_copy - - result = gather.reuse_old_gather_packages( - compose, "x86_64", compose.variants["Server"], [] - ) - self.assertEqual(result, None) - @mock.patch("pungi.phases.gather.load_old_gather_result") @mock.patch("pungi.phases.gather.load_old_compose_config") def test_reuse_compose_config_different_whitelist( @@ -1276,25 +1255,6 @@ class TestReuseOldGatherPackages(helpers.PungiTestCase): ) self.assertEqual(result, None) - @mock.patch("pungi.phases.gather.load_old_gather_result") - @mock.patch("pungi.phases.gather.load_old_compose_config") - def test_reuse_no_old_file_cache( - self, load_old_compose_config, load_old_gather_result - ): - package_sets = self._prepare_package_sets( - load_old_gather_result, requires=[], provides=[] - ) - package_sets[0]["global"].old_file_cache = { - "/build/foo-1-1.x86_64.rpm": MockPkg("foo-1-1.x86_64.rpm", sourcerpm="foo") - } - compose = helpers.DummyCompose(self.topdir, {"gather_allow_reuse": True}) - load_old_compose_config.return_value = compose.conf - - result = gather.reuse_old_gather_packages( - compose, "x86_64", compose.variants["Server"], package_sets - ) - self.assertEqual(result, None) - @mock.patch("pungi.phases.gather.load_old_gather_result") @mock.patch("pungi.phases.gather.load_old_compose_config") def test_reuse_two_rpms_from_same_source( diff --git a/tests/test_unified_isos.py b/tests/test_unified_isos.py index 634eb8bf..9aa3d779 100755 --- a/tests/test_unified_isos.py +++ b/tests/test_unified_isos.py @@ -636,9 +636,7 @@ class TestCreateiso(PungiTestCase): if a.startswith("debug-"): iso_arch += "-debuginfo" a = a.split("-", 1)[1] - path = "{0}/{1}/iso/DP-1.0-20161013.t.4-{1}-dvd.iso".format( - v, arch, iso_arch - ) + path = "{0}/{1}/iso/DP-1.0-20161013.t.4-{1}-dvd.iso".format(v, arch) if image.unified and image.arch == a and image.path == path: break else: diff --git a/tox.ini b/tox.ini index 829a9af0..2976b778 100644 --- a/tox.ini +++ b/tox.ini @@ -4,8 +4,9 @@ envlist = py27, py36 [testenv] deps = flake8 +whitelist_externals = sh commands = - flake8 pungi pungi_utils setup.py tests/*py + sh -c "flake8 pungi pungi_utils setup.py tests/*py" [testenv:py36] deps =