From cccf74c205b05cf81bade4269ea7df99c5dcbea7 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 21 Oct 2011 11:57:10 +0200 Subject: tests/test_debfile_multiarch.py: skip test if e.g. unvierse is not enabled --- tests/test_debfile_multiarch.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'tests/test_debfile_multiarch.py') diff --git a/tests/test_debfile_multiarch.py b/tests/test_debfile_multiarch.py index db777692..7c02a32a 100644 --- a/tests/test_debfile_multiarch.py +++ b/tests/test_debfile_multiarch.py @@ -35,7 +35,11 @@ class TestDebfileMultiarch(unittest.TestCase): cache = apt.Cache() # WARNING: this assumes that lib3ds-1-3 is a non-multiarch lib # use "lib3ds-1-3" as a test to see if non-multiach lib conflicts work - cache["lib3ds-1-3"].mark_install() + canary = "lib3ds-1-3" + if not canary in cache: + logging.warn("skipping test because %s is missing" % canary) + return + cache[canary].mark_install() deb = apt.debfile.DebPackage( "./data/test_debs/multiarch-test1_i386.deb", cache=cache) # this deb should now not be installable -- cgit v1.2.3