From 3c1d761f1a990b797db0ef4b786f4e65212bf31d Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 23 Aug 2015 15:25:38 -0400 Subject: Give test_osinfo.py a generic implementation of process_ram() --- tests/osinfo.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/osinfo.py b/tests/osinfo.py index 66a2e0ac..a7ebd2ef 100644 --- a/tests/osinfo.py +++ b/tests/osinfo.py @@ -64,9 +64,9 @@ elif env.LINUX: """How much RAM is this process using? (Linux implementation)""" return _VmB('VmRSS') - else: - # Don't have an implementation, at least satisfy the interface. + # Generic implementation. def process_ram(): - """How much RAM is this process using? (placebo implementation)""" - return 0 + """How much RAM is this process using? (stdlib implementation)""" + import resource + return resource.getrusage(resource.RUSAGE_SELF).ru_maxrss -- cgit v1.2.1