summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-01-15 15:07:58 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2010-01-15 15:07:58 +0100
commitb260eee89b518829f379f9555b8a61804ef86bc6 (patch)
treeb835d40ac35c7e2bd4633e72faa4a18df5ed5ae8 /tests
parentc86aad8bf2070784a95dda2cd0fb8f7aaff6860f (diff)
parent2530221de1657aeac3fa2b93c6b17712a08c6399 (diff)
downloadpython-apt-b260eee89b518829f379f9555b8a61804ef86bc6.tar.gz
* apt/cache.py:
- improved docstring for the cache - add "enhances" property * data/templates/Ubuntu.info.in: - add lucid * python/cache.cc: - add UntranslatedDepType attribute to DependencyType - add DepTypeEnum that returns a value from {DepDepends, DepPreDepends, ...} * python/apt_pkgmodule.cc: - add DepDpkgBreaks, DepEnhances constants * doc/source/apt_pkg/{cache.rst, index.rst}: - update documentation as well
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]