From: Brian Warner Date: Fri, 6 Feb 2009 05:10:42 +0000 (-0700) Subject: test_cli.backup: oops, fix test to work even when sqlite is unavailable X-Git-Tag: allmydata-tahoe-1.3.0~74 X-Git-Url: https://git.rkrishnan.org/architecture.txt?a=commitdiff_plain;h=814fec5495bd8c894f8e1050187357f3ba3907e9;p=tahoe-lafs%2Ftahoe-lafs.git test_cli.backup: oops, fix test to work even when sqlite is unavailable --- diff --git a/src/allmydata/test/test_cli.py b/src/allmydata/test/test_cli.py index ebfd5ed2..b2b5dc8f 100644 --- a/src/allmydata/test/test_cli.py +++ b/src/allmydata/test/test_cli.py @@ -754,7 +754,10 @@ class Backup(SystemTestMixin, CLITestMixin, unittest.TestCase): self.failUnlessEqual(err, "") self.failUnlessEqual(rc, 0) self.new_archives = out.split() - self.failUnlessEqual(len(self.new_archives), 3) + expected_new = 2 + if have_bdb: + expected_new += 1 + self.failUnlessEqual(len(self.new_archives), expected_new) # the original backup should still be the oldest (i.e. sorts # alphabetically towards the beginning) self.failUnlessEqual(sorted(self.new_archives)[0], @@ -794,7 +797,10 @@ class Backup(SystemTestMixin, CLITestMixin, unittest.TestCase): self.failUnlessEqual(err, "") self.failUnlessEqual(rc, 0) self.new_archives = out.split() - self.failUnlessEqual(len(self.new_archives), 4) + expected_new = 3 + if have_bdb: + expected_new += 1 + self.failUnlessEqual(len(self.new_archives), expected_new) self.failUnlessEqual(sorted(self.new_archives)[0], self.old_archives[0]) d.addCallback(_check6)