diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-08-23 15:25:38 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-08-23 15:25:38 -0400 |
commit | 3c1d761f1a990b797db0ef4b786f4e65212bf31d (patch) | |
tree | 82171e42b35d39674358d2a82938558d47574d7e | |
parent | 57e59d2cb3d7d6a793194806ddea039d73442e9d (diff) | |
download | python-coveragepy-git-3c1d761f1a990b797db0ef4b786f4e65212bf31d.tar.gz |
Give test_osinfo.py a generic implementation of process_ram()
-rw-r--r-- | tests/osinfo.py | 8 |
1 files 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 |