clean up
This commit is contained in:
@@ -8,7 +8,6 @@ import os
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import re
|
import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
|
||||||
from typing import Any
|
from typing import Any
|
||||||
from typing import Callable
|
from typing import Callable
|
||||||
from typing import Literal
|
from typing import Literal
|
||||||
@@ -96,14 +95,11 @@ class NodeManager:
|
|||||||
) -> list[WorkerController]:
|
) -> list[WorkerController]:
|
||||||
self.config.hook.pytest_xdist_setupnodes(config=self.config, specs=self.specs)
|
self.config.hook.pytest_xdist_setupnodes(config=self.config, specs=self.specs)
|
||||||
self.trace("setting up nodes")
|
self.trace("setting up nodes")
|
||||||
t = time.monotonic()
|
|
||||||
with ThreadPoolExecutor(max_workers=len(self.specs)) as executor:
|
with ThreadPoolExecutor(max_workers=len(self.specs)) as executor:
|
||||||
futs = [
|
futs = [
|
||||||
executor.submit(self.setup_node, spec, putevent) for spec in self.specs
|
executor.submit(self.setup_node, spec, putevent) for spec in self.specs
|
||||||
]
|
]
|
||||||
ret = [f.result() for f in futs]
|
return [f.result() for f in futs]
|
||||||
print("setup_nodes took %.3f seconds" % (time.monotonic() - t))
|
|
||||||
return ret
|
|
||||||
|
|
||||||
def setup_node(
|
def setup_node(
|
||||||
self,
|
self,
|
||||||
|
|||||||
Reference in New Issue
Block a user