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

Method test_enter

Lib/test/_test_multiprocessing.py:3258–3272  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3256
3257 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
3258 def test_enter(self):
3259 if self.TYPE == 'manager':
3260 self.skipTest("test not applicable to manager")
3261
3262 pool = self.Pool(1)
3263 with pool:
3264 pass
3265 # call pool.terminate()
3266 # pool is no longer running
3267
3268 with self.assertRaises(ValueError):
3269 # bpo-35477: pool.__enter__() fails if the pool is not running
3270 with pool:
3271 pass
3272 pool.join()
3273
3274 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
3275 def test_resource_warning(self):

Callers

nothing calls this directly

Calls 4

joinMethod · 0.95
skipTestMethod · 0.80
PoolMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected