diff options
author | R David Murray <rdmurray@bitdance.com> | 2014-03-25 19:31:50 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2014-03-25 19:31:50 (GMT) |
commit | ef1c26798ca95d10d29979c6fef77ac3b6f27c26 (patch) | |
tree | 074534905e338281d8f9937635becd0cd27bc86e /Misc | |
parent | 87d13ea56d58851c35952aa8dac24168fceac15a (diff) | |
download | cpython-ef1c26798ca95d10d29979c6fef77ac3b6f27c26.zip cpython-ef1c26798ca95d10d29979c6fef77ac3b6f27c26.tar.gz cpython-ef1c26798ca95d10d29979c6fef77ac3b6f27c26.tar.bz2 |
backport: #20145: assert[Raises|Warns]Regex now raise TypeError on bad regex.
Previously a non-string, non-regex second argument and missing callable
argument could cause the test to appear to always pass.
Initial patch by Kamilla Holanda.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/ACKS | 1 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 4 insertions, 0 deletions
@@ -546,6 +546,7 @@ Stefan Hoffmeister Albert Hofkamp Tomas Hoger Jonathan Hogg +Kamilla Holanda Steve Holden Akintayo Holder Thomas Holenstein @@ -24,6 +24,9 @@ Core and Builtins Library ------- +- Issue #20145: `assertRaisesRegex` and `assertWarnsRegex` now raise a + TypeError if the second argument is not a string or compiled regex. + - Issue #21058: Fix a leak of file descriptor in :func:`tempfile.NamedTemporaryFile`, close the file descriptor if :func:`io.open` fails |