[issue16055] incorrect error text for int(base=1000, x='1')
Serhiy Storchaka
report at bugs.python.org
Fri Sep 28 16:26:09 CEST 2012
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 <report at bugs.python.org>
<http://bugs.python.org/issue16055>
_______________________________________
More information about the Python-bugs-list
mailing list