MCPcopy Index your code
hub / github.com/python/cpython / setUp

Method setUp

Lib/test/test_concurrent_futures/util.py:45–60  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43 executor_kwargs = {}
44
45 def setUp(self):
46 super().setUp()
47
48 self.t1 = time.monotonic()
49 if hasattr(self, "ctx"):
50 self.executor = self.executor_type(
51 max_workers=self.worker_count,
52 mp_context=self.get_context(),
53 **self.executor_kwargs)
54 with warnings_helper.ignore_fork_in_thread_deprecation_warnings():
55 self.manager = self.get_context().Manager()
56 else:
57 self.executor = self.executor_type(
58 max_workers=self.worker_count,
59 **self.executor_kwargs)
60 self.manager = None
61
62 def tearDown(self):
63 self.executor.shutdown(wait=True)

Callers

nothing calls this directly

Calls 4

get_contextMethod · 0.95
superClass · 0.85
ManagerMethod · 0.80
setUpMethod · 0.45

Tested by

no test coverage detected