MCPcopy
hub / github.com/celery/celery / test_load_average

Function test_load_average

t/unit/utils/test_sysinfo.py:18–23  ·  view source on GitHub ↗
(patching)

Source from the content-addressed store, hash-verified

16 reason='Function os.getloadavg is not defined'
17)
18def test_load_average(patching):
19 getloadavg = patching('os.getloadavg')
20 getloadavg.return_value = 0.54736328125, 0.6357421875, 0.69921875
21 l = load_average()
22 assert l
23 assert l == (0.55, 0.64, 0.7)
24
25
26@pytest.mark.skipif(

Callers

nothing calls this directly

Calls 2

load_averageFunction · 0.90
patchingFunction · 0.85

Tested by

no test coverage detected