Modified:
/trunk/test/_osx.py
=======================================
--- /trunk/test/_osx.py Wed Oct 5 11:45:49 2011
+++ /trunk/test/_osx.py Mon Mar 5 16:20:01 2012
@@ -12,6 +12,7 @@
import subprocess
import time
import sys
+import os
import psutil
@@ -45,6 +46,11 @@
sysctl_hwphymem = sysctl('sysctl hw.memsize')
self.assertEqual(sysctl_hwphymem, psutil.TOTAL_PHYMEM)
+ def test_total_virtmem(self):
+ tot1 = psutil.virtmem_usage().total
+ tot2 = os.path.getsize("/var/vm/swapfile0")
+ assertEqual(tot1, tot2)
+
def test_process_create_time(self):
cmdline = "ps -o lstart -p %s" %self.pid
p = subprocess.Popen(cmdline, shell=1, stdout=subprocess.PIPE)