summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-05 22:43:30 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-05 22:43:30 +0200
commit9a60588d6a76fa9705d69779ed83aefded657dca (patch)
tree73661ee354e5403d61ca07dc96d8bec98d1b25f4 /tests
parentad19dcb4f3608779551383103a23ccceb7df3e9c (diff)
parent7bc62fa42772b72f5a4f68729e6fc3aabfb909e8 (diff)
downloadpython-apt-9a60588d6a76fa9705d69779ed83aefded657dca.tar.gz
fix another crash and add regression test
Diffstat (limited to 'tests')
-rw-r--r--tests/data/test_debs/impossible-build-depends_2.5-1.dsc33
-rw-r--r--tests/test_debfile.py4
2 files changed, 37 insertions, 0 deletions
diff --git a/tests/data/test_debs/impossible-build-depends_2.5-1.dsc b/tests/data/test_debs/impossible-build-depends_2.5-1.dsc
new file mode 100644
index 00000000..7f7364ae
--- /dev/null
+++ b/tests/data/test_debs/impossible-build-depends_2.5-1.dsc
@@ -0,0 +1,33 @@
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+Format: 1.0
+Source: hello
+Binary: hello
+Architecture: any
+Version: 2.5-1
+Maintainer: Santiago Vila <sanvila@debian.org>
+Homepage: http://www.gnu.org/software/hello
+Standards-Version: 3.8.4
+Build-Depends: debhelper (>> 101)
+Checksums-Sha1:
+ dfaf92bfc8144141bcd5ffb4a30777cd57501bfa 582535 hello_2.5.orig.tar.gz
+ a98ab19072b35295ded3560721662131933f7c05 5965 hello_2.5-1.diff.gz
+Checksums-Sha256:
+ 22934a7d3a62f247ce3b5a77a2c7f7dd095ad8aef305efa2d0d15e0fef31c446 582535 hello_2.5.orig.tar.gz
+ c2f17c08a6a94bdab4f4316beb4687e8468de03a5162f1d694a0bab4b90e5962 5965 hello_2.5-1.diff.gz
+Files:
+ cf4b73d837692b93676ccd723bf6f797 582535 hello_2.5.orig.tar.gz
+ fa6c41ce60b975294781ed00d67f32fe 5965 hello_2.5-1.diff.gz
+
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.10 (GNU/Linux)
+
+iQEcBAEBCAAGBQJLeDJTAAoJEEHOfwufG4syQSAH/0S9vYKRbs71bfGNmKTmRQy6
+TJM1oj3hdjJoE9HBvCBoBhRSB7l5Iz+TDVyvKTcFOnXTWrZfhnNRCoErtOxP8Z0R
+MOEeLDTPf3JEvpwaRbfzngp+dRkAXTJSI+equqOvj4jjPd1lrNegWtwTF6VIlXAX
+5s+onfBp29/MesxzTGAdviobMYCdazmi2XceC+t5ZEJzEsMMPO6i/v22SrvE/Jkg
+LiD/U6gea3/1dovsUY6I7/VyzMhHgdcuUW4dzovr2daLwE+uRp9R90XDtKN5aWUM
+oBzk8vBIsw/3EV5kjCKdMtqFGdHBjn4nTKvyoXmJ1SvEzeEd21WvLsBFpcJVKaw=
+=YMqG
+-----END PGP SIGNATURE-----
diff --git a/tests/test_debfile.py b/tests/test_debfile.py
index e042a30c..5a6c2df9 100644
--- a/tests/test_debfile.py
+++ b/tests/test_debfile.py
@@ -58,6 +58,10 @@ class TestDebfilee(unittest.TestCase):
self.assertTrue(deb.check())
missing = set(['debhelper', 'libnet1-dev', 'libpcap-dev', 'autotools-dev'])
self.assertEqual(set(deb.missing_deps), missing)
+ filename = "impossible-build-depends_2.5-1.dsc"
+ deb = apt.debfile.DscSrcPackage(cache=self.cache)
+ deb.open(os.path.join("data", "test_debs", filename))
+ self.assertFalse(deb.check())
def testDebFile(self):
deb = apt.debfile.DebPackage(cache=self.cache)