bpo-33967: Fix wrong use of assertRaises (GH-8306)
(cherry picked from commit 56d8f57b83
)
Co-authored-by: INADA Naoki <methane@users.noreply.github.com>
This commit is contained in:
parent
bfa8a358e2
commit
892df9d15a
|
@ -2192,7 +2192,7 @@ class TestSingleDispatch(unittest.TestCase):
|
||||||
def f(*args):
|
def f(*args):
|
||||||
pass
|
pass
|
||||||
msg = 'f requires at least 1 positional argument'
|
msg = 'f requires at least 1 positional argument'
|
||||||
with self.assertRaises(TypeError, msg=msg):
|
with self.assertRaisesRegex(TypeError, msg):
|
||||||
f()
|
f()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|
Loading…
Reference in New Issue