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

Method test_daemon_argument

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

Source from the content-addressed store, hash-verified

422 q.put(arg)
423
424 def test_daemon_argument(self):
425 if self.TYPE == "threads":
426 self.skipTest('test not appropriate for {}'.format(self.TYPE))
427
428 # By default uses the current process's daemon flag.
429 proc0 = self.Process(target=self._test)
430 self.assertEqual(proc0.daemon, self.current_process().daemon)
431 proc1 = self.Process(target=self._test, daemon=True)
432 self.assertTrue(proc1.daemon)
433 proc2 = self.Process(target=self._test, daemon=False)
434 self.assertFalse(proc2.daemon)
435
436 @classmethod
437 def _test(cls, q, *args, **kwds):

Callers

nothing calls this directly

Calls 6

skipTestMethod · 0.80
assertTrueMethod · 0.80
assertFalseMethod · 0.80
formatMethod · 0.45
ProcessMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected