MCPcopy
hub / github.com/celery/celery / test_mem_rss

Function test_mem_rss

t/unit/utils/test_debug.py:65–74  ·  view source on GitHub ↗
(patching)

Source from the content-addressed store, hash-verified

63
64
65def test_mem_rss(patching):
66 humanbytes = patching('celery.utils.debug.humanbytes')
67 ps = patching('celery.utils.debug.ps')
68 ret = debug.mem_rss()
69 ps.assert_called_with()
70 ps().memory_info.assert_called_with()
71 humanbytes.assert_called_with(ps().memory_info().rss)
72 assert ret is humanbytes()
73 ps.return_value = None
74 assert debug.mem_rss() is None
75
76
77def test_ps(patching):

Callers

nothing calls this directly

Calls 3

patchingFunction · 0.85
psFunction · 0.85
humanbytesFunction · 0.85

Tested by

no test coverage detected