From: Brian Warner Date: Tue, 17 Feb 2009 18:08:38 +0000 (-0700) Subject: test_backupdb: improve error messages if the test fails X-Git-Tag: allmydata-tahoe-1.4.0~202 X-Git-Url: https://git.rkrishnan.org/%5B/COPYING.TGPPL.html?a=commitdiff_plain;h=d52eadfc588eff0650811df17a7dea8e1956094e;p=tahoe-lafs%2Ftahoe-lafs.git test_backupdb: improve error messages if the test fails --- diff --git a/src/allmydata/test/test_backupdb.py b/src/allmydata/test/test_backupdb.py index ee2e0168..2fbcf23c 100644 --- a/src/allmydata/test/test_backupdb.py +++ b/src/allmydata/test/test_backupdb.py @@ -37,8 +37,9 @@ class BackupDB(unittest.TestCase): if "I was unable to import a python sqlite library" in stderr: pass else: - self.failUnless("backupdb file is unusable" in stderr) - self.failUnless("file is encrypted or is not a database" in stderr) + self.failUnless("backupdb file is unusable" in stderr, stderr) + self.failUnless("file is encrypted or is not a database" in stderr, + stderr) # put a directory in the way, to exercise a different error path where = os.path.join(basedir, "roadblock-dir") @@ -51,8 +52,8 @@ class BackupDB(unittest.TestCase): pass else: self.failUnless(("Unable to create/open backupdb file %s" % where) - in stderr) - self.failUnless("unable to open database file" in stderr) + in stderr, stderr) + self.failUnless("unable to open database file" in stderr, stderr) def writeto(self, filename, data):