Skip to content

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

Merged
vstinner merged 1 commit into
python:2.7from
vstinner:reset_alarm27
Jun 1, 2018
Merged

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

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 3604b23 into python:2.7 Jun 1, 2018
@vstinner vstinner deleted the reset_alarm27 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