[2.7] bpo-31479: Always reset the signal alarm in tests (GH-3588) by vstinner · Pull Request #7314 · python/cpython (original) (raw)

Use "try: ... finally: signal.signal(0)" pattern to make sure that
tests don't "leak" a pending fatal signal alarm.

Fix also typo: replace signal.signal(0) with signal.alarm(0)

(cherry picked from commit 9abee72)

https://bugs.python.org/issue31479