This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients chris.jerdonek, ezio.melotti, inglesp, serhiy.storchaka
Date 2012-09-28.14:26:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1348842369.81.0.619136608047.issue16055@psf.upfronthosting.co.za>
In-reply-to
Content
> +        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)
History
Date User Action Args
2012-09-28 14:26:09serhiy.storchakasetrecipients: + serhiy.storchaka, ezio.melotti, chris.jerdonek, inglesp
2012-09-28 14:26:09serhiy.storchakasetmessageid: <1348842369.81.0.619136608047.issue16055@psf.upfronthosting.co.za>
2012-09-28 14:26:09serhiy.storchakalinkissue16055 messages
2012-09-28 14:26:09serhiy.storchakacreate