summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2011-12-08 17:26:10 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2011-12-08 17:26:10 +0100
commit5fef756d94f52495fa1703d2d27ba73e708c4442 (patch)
treedf7d6a7fa189c480f108655204cb88b514418f1e /tests
parentd236f527f85b185144875e0e7ad9102c4c2dabd0 (diff)
parentd686a36d94e909eefc13403391ee60938f54df5c (diff)
downloadpython-apt-5fef756d94f52495fa1703d2d27ba73e708c4442.tar.gz
merged from debian
Diffstat (limited to 'tests')
-rw-r--r--tests/test_apt_cache.py2
-rw-r--r--tests/test_debfile.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/tests/test_apt_cache.py b/tests/test_apt_cache.py
index 7784a25f..6ec04ed5 100644
--- a/tests/test_apt_cache.py
+++ b/tests/test_apt_cache.py
@@ -182,7 +182,7 @@ class TestAptCache(unittest.TestCase):
apt_pkg.config.set("dir::etc::sourceparts", old_source_parts)
def test_package_cmp(self):
- cache = apt.Cache()
+ cache = apt.Cache(rootdir="/")
l = []
l.append(cache["libc6"])
l.append(cache["xterm"])
diff --git a/tests/test_debfile.py b/tests/test_debfile.py
index 70979689..af04af26 100644
--- a/tests/test_debfile.py
+++ b/tests/test_debfile.py
@@ -114,6 +114,12 @@ Description: testpackage for gdebi - contains usr/bin/binary for file reading
deb = apt.debfile.DebPackage("./data/test_debs/data-tar-xz.deb")
self.assertEqual(deb.filelist, ["./", "usr/", "usr/bin/"])
+ def test_check_exception(self):
+ deb = apt.debfile.DebPackage("./data/test_debs/data-tar-xz.deb")
+ self.assertRaises(AttributeError, lambda: deb.missing_deps)
+ deb.check()
+ deb.missing_deps
+
def test_no_supported_data_tar(self):
# ensure that a unknown data.tar.xxx raises a exception
raised = False
@@ -132,7 +138,6 @@ Description: testpackage for gdebi - contains usr/bin/binary for file reading
deb = apt.debfile.DebPackage("./data/test_debs/multiarch-test1_i386.deb")
res = deb.check()
# FIXME: do something sensible with the multiarch test
-