Commit c0dc65ef authored by Terry Jan Reedy's avatar Terry Jan Reedy

Change deprecated Exception.message to Exception.args-[0] where the use of

.message is not an essential part of the test.
parent 54edfb3e
......@@ -70,7 +70,7 @@ class CommonTest(unittest.TestCase):
args = self.fixtype(args)
with self.assertRaises(exc) as cm:
getattr(obj, methodname)(*args)
self.assertNotEqual(cm.exception.message, '')
self.assertNotEqual(cm.exception.args[0], '')
# call object.method(*args) without any checks
def checkcall(self, object, methodname, *args):
......
......@@ -19,7 +19,7 @@ class StringTest(
def checkraises(self, exc, obj, methodname, *args):
with self.assertRaises(exc) as cm:
getattr(string, methodname)(obj, *args)
self.assertNotEqual(cm.exception.message, '')
self.assertNotEqual(cm.exception.args[0], '')
def checkcall(self, object, methodname, *args):
getattr(string, methodname)(object, *args)
......
......@@ -33,7 +33,7 @@ class UserStringTest(
# we don't fix the arguments, because UserString can't cope with it
with self.assertRaises(exc) as cm:
getattr(obj, methodname)(*args)
self.assertNotEqual(cm.exception.message, '')
self.assertNotEqual(cm.exception.args[0], '')
def checkcall(self, object, methodname, *args):
object = self.fixtype(object)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment