(patching)
| 63 | |
| 64 | |
| 65 | def 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 | |
| 77 | def test_ps(patching): |
nothing calls this directly
no test coverage detected