]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-43406: Fix test_signal.test_stress_modifying_handlers() (GH-24815)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 10 Mar 2021 14:49:27 +0000 (06:49 -0800)
committerGitHub <noreply@github.com>
Wed, 10 Mar 2021 14:49:27 +0000 (06:49 -0800)
commitac5e23c540f5ec20fc390c72e097e0fdaf8b7ac9
tree9a9a6c4c0c3041fad9ef34e1586b0d5441adb989
parenta6d0182879d0bf275c4feb38b57f73236ab9c06c
bpo-43406: Fix test_signal.test_stress_modifying_handlers() (GH-24815)

Fix a race condition of test_stress_modifying_handlers() of
test_signal: only raise signals while we are in the
catch_unraisable_exception() context manager.
Moreover, don't check if we received at least one
signal if at least one signal got ignored.
(cherry picked from commit 1fa17e8cc62775a2e34b158135ce8589f9394f03)

Co-authored-by: Victor Stinner <vstinner@python.org>
Lib/test/test_signal.py