Author ezio.melotti
Recipients ezio.melotti, michael.foord, the.mulhern
Date 2014-02-10.07:52:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1392018749.75.0.384275358723.issue20145@psf.upfronthosting.co.za>
In-reply-to
Content
The two signatures of assertRaisesRegex are:
assertRaisesRegex(exception, regex, callable, *args, **kwds)
assertRaisesRegex(exception, regex, msg=None)

IIUC what you are saying is that if you forget the regex and call assertRaisesRegex(exception, callable) the test will pass.

I think it would be ok to add a check to see if the second argument is a callable or None (or maybe check if it's a string or regex object?), and give an appropriate error message if it's not.
History
Date User Action Args
2014-02-10 07:52:29ezio.melottisetrecipients: + ezio.melotti, michael.foord, the.mulhern
2014-02-10 07:52:29ezio.melottisetmessageid: <1392018749.75.0.384275358723.issue20145@psf.upfronthosting.co.za>
2014-02-10 07:52:29ezio.melottilinkissue20145 messages
2014-02-10 07:52:29ezio.melotticreate