summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_enhances.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/test_enhances.py b/tests/test_enhances.py
new file mode 100644
index 00000000..3eced9f9
--- /dev/null
+++ b/tests/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]