Serhiy Storchaka added the comment:
> + with self.assertRaises(ValueError) as e:
> + int('100', 1)
> + self.assertEquals(str(e.exception),
> + "int() arg base must be 0 or >= 2 and <= 36")
Why not use assertRaisesRegex()?
self.assertRaisesRegex(ValueError,
r'^int\() arg base must be 0 or >= 2 and <= 36$',
int, '100', 1)
----------
nosy: +storchaka
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16055>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com