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

Method test_config_set_cpu_count

Lib/test/test_capi/test_config.py:379–388  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

377 config_set(name, old_value)
378
379 def test_config_set_cpu_count(self):
380 config_get = _testcapi.config_get
381 config_set = _testcapi.config_set
382
383 old_value = config_get('cpu_count')
384 try:
385 config_set('cpu_count', 123)
386 self.assertEqual(os.cpu_count(), 123)
387 finally:
388 config_set('cpu_count', old_value)
389
390 def test_config_set_read_only(self):
391 # Test PyConfig_Set() on read-only options

Callers

nothing calls this directly

Calls 2

cpu_countMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected