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

Method test_context

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

Source from the content-addressed store, hash-verified

5689 self.assertEqual(child_method, ctx.get_start_method())
5690
5691 def test_context(self):
5692 for method in ('fork', 'spawn', 'forkserver'):
5693 try:
5694 ctx = multiprocessing.get_context(method)
5695 except ValueError:
5696 continue
5697 self.assertEqual(ctx.get_start_method(), method)
5698 self.assertIs(ctx.get_context(), ctx)
5699 self.assertRaises(ValueError, ctx.set_start_method, 'spawn')
5700 self.assertRaises(ValueError, ctx.set_start_method, None)
5701 self.check_context(ctx)
5702
5703 def test_context_check_module_types(self):
5704 try:

Callers

nothing calls this directly

Calls 6

check_contextMethod · 0.95
get_contextMethod · 0.45
assertEqualMethod · 0.45
get_start_methodMethod · 0.45
assertIsMethod · 0.45
assertRaisesMethod · 0.45

Tested by

no test coverage detected