8000 bpo-40275: reduce importing module nums by lazy import in libregrtest by shihai1991 · Pull Request #20207 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40275: reduce importing module nums by lazy import in libregrtest #20207

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

Closed
wants to merge 3 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
cancel lazy import of faulthandler in runtest_mp
  • Loading branch information
shihai1991 committed Jun 17, 2020
commit 324ff77632296bfae657c99e694e5fb6a2467241
3 changes: 1 addition & 2 deletions Lib/test/libregrtest/runtest_mp.py
8EB3
Original file line numberDiff line number Diff line change
@@ -1,4 +1,5 @@
import collections
import faulthandler
import json
import os
import queue
Expand Down Expand Up @@ -380,7 +381,6 @@ def stop_workers(self):
worker.wait_stopped(start_time)

def _get_result(self):
import faulthandler
if not any(worker.is_alive() for worker in self.workers):
# all worker threads are done: consume pending results
try:
Expand Down Expand Up @@ -443,7 +443,6 @@ def _process_result(self, item):
return False

def run_tests(self):
import faulthandler
self.start_workers()

self.test_index = 0
Expand Down
0