classification
Title: [easy] test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method
Type: Stage: resolved
Components: Tests Versions: Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: hakancelik, serhiy.storchaka, vstinner
Priority: normal Keywords: newcomer friendly, patch

Created on 2020-01-22 16:56 by vstinner, last changed 2020-01-30 11:59 by vstinner. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18277 merged python-dev, 2020-01-30 08:47
Messages (4)
msg360486 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-01-22 16:56
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.
msg360787 - (view) Author: Hakan Çelik (hakancelik) * Date: 2020-01-27 18:19
I want to work on this as my first contribution
msg361032 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-01-30 10:26
New changeset 38c878b56cff997de8fb04a586c963039b69b414 by damani42 in branch 'master':
bpo-39424: Use assertRaisesRegex instead of assertRaisesRegexp. (GH-18277)
https://github.com/python/cpython/commit/38c878b56cff997de8fb04a586c963039b69b414
msg361047 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2020-01-30 11:59
Thanks damani42 for the fix!


Hakan: "I want to work on this as my first contribution"

I'm sorry for you, damani42 was faster than you to propose a PR! You can look for other "newcomer friendly" issues on the bug tracker by searching per keyword.
History
Date User Action Args
2020-01-30 11:59:24vstinnersetmessages: + msg361047
2020-01-30 10:27:59serhiy.storchakasetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-01-30 10:26:29serhiy.storchakasetnosy: + serhiy.storchaka
messages: + msg361032
2020-01-30 08:47:39python-devsetkeywords: + patch
stage: patch review
pull_requests: + pull_request17652
2020-01-27 18:19:24hakanceliksetnosy: + hakancelik
messages: + msg360787
2020-01-24 10:42:20vstinnersettitle: test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method -> [easy] test_signal: test_pidfd_send_signal() uses deprecated assertRaisesRegexp() method
2020-01-22 16:56:21vstinnercreate