bpo-31479: Always reset the signal alarm in tests by vstinner · Pull Request #3588 · python/cpython

@vstinner

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

serhiy-storchaka

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

@vstinner

serhiy-storchaka

@vstinner

serhiy-storchaka

vstinner added a commit that referenced this pull request

Jun 1, 2018
* bpo-31479: Always reset the signal alarm in tests

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

* Move two more alarm() calls into the try block

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

* Move another signal.alarm() into the try block

(cherry picked from commit 9abee72)

vstinner added a commit that referenced this pull request

Jun 1, 2018
* bpo-31479: Always reset the signal alarm in tests

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

* Move two more alarm() calls into the try block

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

* Move another signal.alarm() into the try block

(cherry picked from commit 9abee72)