summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2005-05-27 12:36:25 +0000
committerMichael Vogt <michael.vogt@ubuntu.com>2005-05-27 12:36:25 +0000
commita0ecde5eca76ceb2155ab4322c678ef2b41a7965 (patch)
tree16811678a030497b7193b4c7b314a3684c5d9442
parent63cfbd9034757cd89d7310dfd9fdaa170bbfa19a (diff)
downloadpython-apt-a0ecde5eca76ceb2155ab4322c678ef2b41a7965.tar.gz
* basic tests of the native python apt interface
-rw-r--r--tests/apt-test.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/apt-test.py b/tests/apt-test.py
new file mode 100644
index 00000000..714101d9
--- /dev/null
+++ b/tests/apt-test.py
@@ -0,0 +1,10 @@
+import apt
+
+if __name__ == "__main__":
+ progress = apt.progress.OpTextProgress()
+ cache = apt.Cache(progress)
+ print "Packages count: %s" % len(cache.keys())
+ for key in cache.keys():
+ p = cache[key]
+ if p == None or p.Name() == None or p.Name == "" or p._pkg == None:
+ print "Something strange is going on"