aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/base.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-11-12 12:18:50 -0500
committerW. Trevor King <wking@tremily.us>2012-11-12 12:18:55 -0500
commit2a79c77e0f4150d9a49c584f9ce6c03a6822803f (patch)
tree6b500f2958ee339e273ba6b27b28152a3aad3bfd /libbe/storage/base.py
parent5887a061501443f780f976b5fb31320a858abe7a (diff)
downloadbugseverywhere-2a79c77e0f4150d9a49c584f9ce6c03a6822803f.tar.gz
storage:base: convert to Python 3.3 compatibility
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."""