MCPcopy
hub / github.com/celery/celery / test_sample_mem

Function test_sample_mem

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

Source from the content-addressed store, hash-verified

23
24
25def test_sample_mem(patching):
26 mem_rss = patching('celery.utils.debug.mem_rss')
27 prev, debug._mem_sample = debug._mem_sample, []
28 try:
29 debug.sample_mem()
30 assert debug._mem_sample[0] is mem_rss()
31 finally:
32 debug._mem_sample = prev
33
34
35def test_sample():

Callers

nothing calls this directly

Calls 2

patchingFunction · 0.85
mem_rssFunction · 0.85

Tested by

no test coverage detected