aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'libbe/storage/base.py')
-rw-r--r--libbe/storage/base.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/libbe/storage/base.py b/libbe/storage/base.py
index 8722590..977179d 100644
--- a/libbe/storage/base.py
+++ b/libbe/storage/base.py
@@ -563,18 +563,20 @@ if TESTING == True:
def fail(self, msg=None):
"""Fail immediately, with the given message."""
- raise self.failureException, \
- '(%s) %s' % (self._classname(), msg)
+ raise self.failureException(
+ '({0}) {1}'.format(self._classname(), msg))
def failIf(self, expr, msg=None):
"Fail the test if the expression is true."
- if expr: raise self.failureException, \
- '(%s) %s' % (self._classname(), msg)
+ if expr:
+ raise self.failureException(
+ '({0}) {1}'.format(self._classname(), msg))
def failUnless(self, expr, msg=None):
"""Fail the test unless the expression is true."""
- if not expr: raise self.failureException, \
- '(%s) %s' % (self._classname(), msg)
+ if not expr:
+ raise self.failureException(
+ '({0}) {1}'.format(self._classname(), msg))
def setUp(self):
"""Set up test fixtures for Storage test case."""