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

Method test_cpu_count

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

Source from the content-addressed store, hash-verified

672 self.assertEqual(exitcode, -signal.SIGTERM)
673
674 def test_cpu_count(self):
675 try:
676 cpus = multiprocessing.cpu_count()
677 except NotImplementedError:
678 cpus = 1
679 self.assertIsInstance(cpus, int)
680 self.assertGreaterEqual(cpus, 1)
681
682 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
683 def test_active_children(self):

Callers

nothing calls this directly

Calls 3

cpu_countMethod · 0.80
assertIsInstanceMethod · 0.80
assertGreaterEqualMethod · 0.80

Tested by

no test coverage detected