MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_enter

Method test_enter

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

Source from the content-addressed store, hash-verified

2990 self.assertEqual(CountedObject.n_instances, 0)
2991
2992 def test_enter(self):
2993 if self.TYPE == 'manager':
2994 self.skipTest("test not applicable to manager")
2995
2996 pool = self.Pool(1)
2997 with pool:
2998 pass
2999 # call pool.terminate()
3000 # pool is no longer running
3001
3002 with self.assertRaises(ValueError):
3003 # bpo-35477: pool.__enter__() fails if the pool is not running
3004 with pool:
3005 pass
3006 pool.join()
3007
3008 def test_resource_warning(self):
3009 if self.TYPE == 'manager':

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