bpo-43406: Fix test_signal.test_stress_modifying_handlers() (GH-24815) (GH-24817)
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>
Co-authored-by: Victor Stinner <vstinner@python.org>