From 2a79c77e0f4150d9a49c584f9ce6c03a6822803f Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 12 Nov 2012 12:18:50 -0500 Subject: [PATCH] storage:base: convert to Python 3.3 compatibility --- libbe/storage/base.py | 14 ++++++++------ 1 file 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.""" -- 2.26.2