Skip to content

Commit

Permalink
add windows test for free physical mem giampaolo#2074
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <widdis@gmail.com>
  • Loading branch information
giampaolo authored and dbwiddis committed Apr 12, 2023
1 parent 975ef95 commit b86a5dc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions psutil/tests/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import psutil
from psutil import WINDOWS
from psutil._compat import FileNotFoundError
from psutil._compat import which
from psutil._compat import super
from psutil._compat import which
from psutil.tests import APPVEYOR
Expand Down Expand Up @@ -161,6 +162,7 @@ def test_free_phymem(self):
self.assertAlmostEqual(
int(w.AvailableBytes), psutil.virtual_memory().free,
delta=TOLERANCE_SYS_MEM)

def test_total_swapmem(self):
if (psutil.swap_memory().total > 0):
w = wmi.WMI().Win32_PerfRawData_PerfOS_Memory()[0]
Expand Down

0 comments on commit b86a5dc

Please sign in to comment.