Kamilla added the comment:

I've implemented a piece of code to check if the expected_regex is a string or 
regex object. If it's not it raises a TypeError exception. The check is inside 
the __init__ method of the _AssertRaisesBaseContext class so it will always 
check the expected_regex in all methods that use the _AssertRaises.

I've added tests too. They are verifying the assertRaisesRegex and the 
assertWarnsRegex methods.

----------
keywords: +patch
Added file: http://bugs.python.org/file34346/validate_regex.patch

_______________________________________
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