MCPcopy Create free account
hub / github.com/celery/celery / test_load_average

Function test_load_average

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

load_averageFunction · 0.90
patchingFunction · 0.85

Tested by

no test coverage detected