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:
Miss Islington (bot) 2018-07-16 22:18:56 -07:00 committed by GitHub
parent bfa8a358e2
commit 892df9d15a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2192,7 +2192,7 @@ def test_invalid_positional_argument(self):
def f(*args):
pass
msg = 'f requires at least 1 positional argument'
with self.assertRaises(TypeError, msg=msg):
with self.assertRaisesRegex(TypeError, msg):
f()
if __name__ == '__main__':