backport: #20145: assertRaisesRegexp now raises a TypeError on bad regex.

Previously a non-string, non-regex second argument and no callable
argument could cause the test to appear to always pass.
4 files changed