From d4829dd415cc26a4e9530f97e831939b79817e36 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 Sep 2011 16:24:03 +0200 Subject: add concept of "ParentComponent" for e.g. ubuntu/multiverse that needs universe enabled as well (plus add test) --- tests/test_aptsources.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'tests') diff --git a/tests/test_aptsources.py b/tests/test_aptsources.py index 193d3806..dcfb0682 100644 --- a/tests/test_aptsources.py +++ b/tests/test_aptsources.py @@ -160,6 +160,29 @@ class TestAptSources(unittest.TestCase): assert sources.list[8].comps == ["main"] assert sources.list[8].line.strip() == str(sources.list[8]) + def test_enable_component(self): + from subprocess import Popen, PIPE + target = "./data/aptsources/sources.list.enable_comps" + line = "deb http://archive.ubuntu.com/ubuntu lucid main\n" + open(target, "w").write(line) + apt_pkg.config.set("Dir::Etc::sourcelist", target) + sources = aptsources.sourceslist.SourcesList(True, self.templates) + distro = aptsources.distro.get_distro(id="Ubuntu") + # make sure we are using the right distro + distro.codename = "lucid" + distro.id = "Ubuntu" + distro.release = "10.04" + # and get the sources + distro.get_sources(sources) + # test enable_component + comp = "multiverse" + distro.enable_component(comp) + comps = set() + for entry in sources: + comps = comps.union(set(entry.comps)) + self.assertTrue("multiverse" in comps) + self.assertTrue("universe" in comps) + def testDistribution(self): """aptsources: Test distribution detection.""" apt_pkg.config.set("Dir::Etc::sourcelist", "data/aptsources/" -- cgit v1.2.3 From 3c35eb3da332cf30781dba78ed777b26934136ac Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 19 Oct 2011 17:23:43 +0200 Subject: releasing version 0.8.1 --- debian/changelog | 4 ++-- po/python-apt.pot | 12 ++++++------ tests/test_apt_cache.py | 2 +- tests/test_progress.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'tests') diff --git a/debian/changelog b/debian/changelog index 39876538..1193e157 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-apt (0.8.1) UNRELEASED; urgency=low +python-apt (0.8.1) unstable; urgency=low [ Julian Andres Klode ] * Breaks: debsecan (<< 0.4.15) [not only << 0.4.14] (Closes: #629512) @@ -27,7 +27,7 @@ python-apt (0.8.1) UNRELEASED; urgency=low * apt/progress/gtk2.py: - update to the latest vte API for child-exited (LP: #865388) - -- Michael Vogt Tue, 09 Aug 2011 09:16:40 +0200 + -- Michael Vogt Wed, 19 Oct 2011 16:39:13 +0200 python-apt (0.8.0) unstable; urgency=low diff --git a/po/python-apt.pot b/po/python-apt.pot index bd9198c9..6d069eea 100644 --- a/po/python-apt.pot +++ b/po/python-apt.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2011-09-28 16:23+0200\n" +"POT-Creation-Date: 2011-10-19 16:45+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -397,26 +397,26 @@ msgstr "" msgid "Custom servers" msgstr "" -#: ../apt/progress/gtk2.py:260 ../apt/progress/gtk2.py:316 +#: ../apt/progress/gtk2.py:261 ../apt/progress/gtk2.py:317 #, python-format msgid "Downloading file %(current)li of %(total)li with %(speed)s/s" msgstr "" -#: ../apt/progress/gtk2.py:266 ../apt/progress/gtk2.py:322 +#: ../apt/progress/gtk2.py:267 ../apt/progress/gtk2.py:323 #, python-format msgid "Downloading file %(current)li of %(total)li" msgstr "" #. Setup some child widgets -#: ../apt/progress/gtk2.py:342 +#: ../apt/progress/gtk2.py:343 msgid "Details" msgstr "" -#: ../apt/progress/gtk2.py:430 +#: ../apt/progress/gtk2.py:431 msgid "Starting..." msgstr "" -#: ../apt/progress/gtk2.py:436 +#: ../apt/progress/gtk2.py:437 msgid "Complete" msgstr "" diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index 2f812059..db68ec63 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -133,7 +133,7 @@ class TestAptCache(unittest.TestCase): old_source_list = apt_pkg.config.find("dir::etc::sourcelist") old_source_parts = apt_pkg.config.find("dir::etc::sourceparts") apt_pkg.config.set("dir::etc::sourcelist", base_sources) - apt_pkg.config.set("dir::etc::sourceparts", "xxx") + apt_pkg.config.set("dir::etc::sourceparts", "/tmp") # main sources.list sources_list = base_sources with open(sources_list, "w") as f: diff --git a/tests/test_progress.py b/tests/test_progress.py index 73853dfa..3b6285d6 100644 --- a/tests/test_progress.py +++ b/tests/test_progress.py @@ -27,7 +27,7 @@ class TestProgress(unittest.TestCase): apt_pkg.init() apt_pkg.config.set("APT::Architecture", "amd64") apt_pkg.config.set("Dir::Etc", basedir) - apt_pkg.config.set("Dir::Etc::sourceparts", "/xxx") + apt_pkg.config.set("Dir::Etc::sourceparts", "/tmp") # setup lists dir if not os.path.exists("./tmp/partial"): os.makedirs("./tmp/partial") -- cgit v1.2.3