From d52eadfc588eff0650811df17a7dea8e1956094e Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Tue, 17 Feb 2009 11:08:38 -0700 Subject: [PATCH] test_backupdb: improve error messages if the test fails --- src/allmydata/test/test_backupdb.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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): -- 2.45.2