diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-11-10 16:06:21 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-11-10 16:06:21 +0100 |
| commit | a0c9ec82095d2e09715e5dc953119ec4fa7b4c2e (patch) | |
| tree | 4c1458a5304b24b6914610104cd0767168e658d8 /tests | |
| parent | 52097d7edaa97379a4a604be4feb24e5e9c3bd73 (diff) | |
| parent | 1948d5d03887eb81ea7797c0f23049ef6c3895ce (diff) | |
| download | python-apt-a0c9ec82095d2e09715e5dc953119ec4fa7b4c2e.tar.gz | |
merge from the mvo branch
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_apt_cache.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py index db68ec63..0d80f617 100644 --- a/tests/test_apt_cache.py +++ b/tests/test_apt_cache.py @@ -181,5 +181,21 @@ class TestAptCache(unittest.TestCase): apt_pkg.config.set("dir::etc::sourcelist", old_source_list) apt_pkg.config.set("dir::etc::sourceparts", old_source_parts) + def test_package_cmp(self): + cache = apt.Cache() + l = [] + l.append(cache["libc6"]) + l.append(cache["xterm"]) + l.append(cache["apt"]) + l.sort() + self.assertEqual([p.name for p in l], + ["apt", "libc6", "xterm"]) + + def test_get_architectures(self): + main_arch = apt.apt_pkg.config.get("APT::Architecture") + arches = apt_pkg.get_architectures() + self.assertTrue(main_arch in arches) + + if __name__ == "__main__": unittest.main() |
