summaryrefslogtreecommitdiff
path: root/tests/old
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2010-01-15 15:20:23 +0100
committerJulian Andres Klode <jak@debian.org>2010-01-15 15:20:23 +0100
commit52cca77b8179a7f625673f19cb132686c0d416c9 (patch)
tree2b554f1669754dc68ec112b16d6081fd60dfb5e3 /tests/old
parent2ccb7545bb8c869f5f6192569a47a7522b6fbc83 (diff)
parent71aad7e28bbaf1ee8efdad77ebfb4e4c0fd0ec26 (diff)
downloadpython-apt-52cca77b8179a7f625673f19cb132686c0d416c9.tar.gz
Merge 0.7.13.5 pre.
Diffstat (limited to 'tests/old')
-rw-r--r--tests/old/test_enhances.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/old/test_enhances.py b/tests/old/test_enhances.py
new file mode 100644
index 00000000..3eced9f9
--- /dev/null
+++ b/tests/old/test_enhances.py
@@ -0,0 +1,17 @@
+#!/usr/bin/python
+
+import apt
+
+cache = apt.Cache()
+
+for pkg in cache:
+ if pkg.installed and pkg.installed.enhances:
+ s = "%s enhances:" % pkg.name
+ for or_list in pkg.installed.enhances:
+ for enhances in or_list.or_dependencies:
+ s += " %s" % enhances.name
+ if (cache.has_key(enhances.name) and
+ not cache[enhances.name].isInstalled):
+ s += "(*missing*) "
+ s += ","
+ print s[:-1]