Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-31234: Enhance test_thread.test_forkinthread() #3516

Merged
merged 1 commit into from
Sep 12, 2017
Merged

bpo-31234: Enhance test_thread.test_forkinthread() #3516

merged 1 commit into from
Sep 12, 2017

Conversation

vstinner
Copy link
Member

@vstinner vstinner commented Sep 12, 2017

  • test_thread.test_forkinthread() now waits until the thread completes.
  • Check the status in the test method, not in the thread function
  • Don't ignore RuntimeError anymore: since the commit
    346cbd3 (bpo-16500,
    os.register_at_fork(), os.fork() cannot fail anymore with
    RuntimeError.
  • Replace 0.01 literal with a new POLL_SLEEP constant
  • test_forkinthread(): test if os.fork() exists rather than testing
    the platform.

https://bugs.python.org/issue31234

* test_thread.test_forkinthread() now waits until the thread completes.
* Check the status in the test method, not in the thread function
* Don't ignore RuntimeError anymore: since the commit
  346cbd3 (bpo-16500,
  os.register_at_fork(), os.fork() cannot fail anymore with
  RuntimeError.
* Replace 0.01 literal with a new POLL_SLEEP constant
* test_forkinthread(): test if os.fork() exists rather than testing
  the platform.
@miss-islington
Copy link
Contributor

Thanks, @Haypo!

@vstinner vstinner deleted the test_thread branch September 12, 2017 17:49
@miss-islington
Copy link
Contributor

Thanks @Haypo for the PR 🌮🎉.. I'm working now to backport this PR to: 3.6.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 12, 2017
* test_thread.test_forkinthread() now waits until the thread completes.
* Check the status in the test method, not in the thread function
* Don't ignore RuntimeError anymore: since the commit
  346cbd3 (bpo-16500,
  os.register_at_fork(), os.fork() cannot fail anymore with
  RuntimeError.
* Replace 0.01 literal with a new POLL_SLEEP constant
* test_forkinthread(): test if os.fork() exists rather than testing
  the platform.
(cherry picked from commit a15d155)
@bedevere-bot
Copy link

GH-3519 is a backport of this pull request to the 3.6 branch.

vstinner pushed a commit that referenced this pull request Sep 12, 2017
…3519)

* test_thread.test_forkinthread() now waits until the thread completes.
* Check the status in the test method, not in the thread function
* Don't ignore RuntimeError anymore: since the commit
  346cbd3 (bpo-16500,
  os.register_at_fork(), os.fork() cannot fail anymore with
  RuntimeError.
* Replace 0.01 literal with a new POLL_SLEEP constant
* test_forkinthread(): test if os.fork() exists rather than testing
  the platform.
(cherry picked from commit a15d155)
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.

5 participants