summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test/test_case.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/unittest/test/test_case.py')
-rw-r--r--Lib/unittest/test/test_case.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/unittest/test/test_case.py b/Lib/unittest/test/test_case.py
index 42a753b..b69fdb3 100644
--- a/Lib/unittest/test/test_case.py
+++ b/Lib/unittest/test/test_case.py
@@ -979,6 +979,12 @@ test case
self.assertRaisesRegexp, Exception, u'x',
lambda: None)
+ def testAssertRaisesRegexpInvalidRegexp(self):
+ # Issue 20145.
+ class MyExc(Exception):
+ pass
+ self.assertRaises(TypeError, self.assertRaisesRegexp, MyExc, lambda: True)
+
def testAssertRaisesRegexpMismatch(self):
def Stub():
raise Exception('Unexpected')