[issue39424] test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method

STINNER Victor report at bugs.python.org
Wed Jan 22 11:56:21 EST 2020


New submission from STINNER Victor <vstinner at python.org>:

test_signal.test_pidfd_send_signal() should use assertRaisesRegex() rather than assertRaisesRegexp():

$ ./python -Werror -m test -v test_signal -m test_pidfd_send_signal 
(...)
======================================================================
ERROR: test_pidfd_send_signal (test.test_signal.PidfdSignalTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/vstinner/python/master/Lib/test/test_signal.py", line 1292, in test_pidfd_send_signal
    with self.assertRaisesRegexp(TypeError, "^siginfo must be None$"):
  File "/home/vstinner/python/master/Lib/unittest/case.py", line 1390, in deprecated_func
    warnings.warn(
DeprecationWarning: Please use assertRaisesRegex instead.

----------
components: Tests
keywords: newcomer friendly
messages: 360486
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39424>
_______________________________________


More information about the Python-bugs-list mailing list