mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-05 01:00:52 +00:00
test_backupdb: improve error messages if the test fails
This commit is contained in:
parent
476a5c8fac
commit
d52eadfc58
@ -37,8 +37,9 @@ class BackupDB(unittest.TestCase):
|
|||||||
if "I was unable to import a python sqlite library" in stderr:
|
if "I was unable to import a python sqlite library" in stderr:
|
||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.failUnless("backupdb file is unusable" in stderr)
|
self.failUnless("backupdb file is unusable" in stderr, stderr)
|
||||||
self.failUnless("file is encrypted or is not a database" in 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
|
# put a directory in the way, to exercise a different error path
|
||||||
where = os.path.join(basedir, "roadblock-dir")
|
where = os.path.join(basedir, "roadblock-dir")
|
||||||
@ -51,8 +52,8 @@ class BackupDB(unittest.TestCase):
|
|||||||
pass
|
pass
|
||||||
else:
|
else:
|
||||||
self.failUnless(("Unable to create/open backupdb file %s" % where)
|
self.failUnless(("Unable to create/open backupdb file %s" % where)
|
||||||
in stderr)
|
in stderr, stderr)
|
||||||
self.failUnless("unable to open database file" in stderr)
|
self.failUnless("unable to open database file" in stderr, stderr)
|
||||||
|
|
||||||
|
|
||||||
def writeto(self, filename, data):
|
def writeto(self, filename, data):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user