Ezio Melotti added the comment:

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.

----------
keywords: +easy

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20145>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to