Skip to content

[3.6] bpo-31479: Always reset the signal alarm in tests (GH-3588)#7312

Merged
vstinner merged 1 commit into
python:3.6from
vstinner:reset_alarm36
Jun 1, 2018
Merged

[3.6] bpo-31479: Always reset the signal alarm in tests (GH-3588)#7312
vstinner merged 1 commit into
python:3.6from
vstinner:reset_alarm36

Conversation

@vstinner

@vstinner vstinner commented Jun 1, 2018

Copy link
Copy Markdown
Member
  • 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)

https://bugs.python.org/issue31479

* 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 vstinner merged commit 95681c7 into python:3.6 Jun 1, 2018
@vstinner vstinner deleted the reset_alarm36 branch June 1, 2018 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants