bpo-39424: Use assertRaisesRegex instead of assertRaisesRegexp. (GH-18277)

This commit is contained in:
damani42 2020-01-30 11:26:22 +01:00 committed by GitHub
parent 1f44e775df
commit 38c878b56c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -1289,7 +1289,7 @@ class PidfdSignalTest(unittest.TestCase):
self.assertEqual(cm.exception.errno, errno.EBADF)
my_pidfd = os.open(f'/proc/{os.getpid()}', os.O_DIRECTORY)
self.addCleanup(os.close, my_pidfd)
with self.assertRaisesRegexp(TypeError, "^siginfo must be None$"):
with self.assertRaisesRegex(TypeError, "^siginfo must be None$"):
signal.pidfd_send_signal(my_pidfd, signal.SIGINT, object(), 0)
with self.assertRaises(KeyboardInterrupt):
signal.pidfd_send_signal(my_pidfd, signal.SIGINT)