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

Method check_cpu_count

Lib/test/test_os/test_os.py:4420–4425  ·  view source on GitHub ↗
(self, cpus)

Source from the content-addressed store, hash-verified

4418
4419class CPUCountTests(unittest.TestCase):
4420 def check_cpu_count(self, cpus):
4421 if cpus is None:
4422 self.skipTest("Could not determine the number of CPUs")
4423
4424 self.assertIsInstance(cpus, int)
4425 self.assertGreater(cpus, 0)
4426
4427 def test_cpu_count(self):
4428 cpus = os.cpu_count()

Callers 2

test_cpu_countMethod · 0.95

Calls 3

skipTestMethod · 0.80
assertIsInstanceMethod · 0.80
assertGreaterMethod · 0.80

Tested by

no test coverage detected