Skip to content

Commit

Permalink
Format to line length < 80
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Widdis <[email protected]>
  • Loading branch information
dbwiddis committed Oct 21, 2022
1 parent cf28bda commit 78861c2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions psutil/tests/test_windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,8 @@ def test_total_phymem(self):
def test_total_swapmem(self):
if (psutil.swap_memory().total > 0):
w = wmi.WMI().Win32_PerfRawData_PerfOS_Memory()[0]
self.assertEqual(int(w.CommitLimit) - psutil.virtual_memory().total,
self.assertEqual(int(w.CommitLimit)
- psutil.virtual_memory().total,
psutil.swap_memory().total)
else:
self.assertEqual(0, psutil.swap_memory().total)
Expand All @@ -141,8 +142,10 @@ def test_percent_swapmem(self):
# exact percent may change but should be reasonable
# assert within +/- 10% and between 0 and 100
self.assertGreaterEqual(psutil.swap_memory().percent, 0)
self.assertGreaterEqual(psutil.swap_memory().percent, percentSwap - 10)
self.assertLessEqual(psutil.swap_memory().percent, percentSwap + 10)
self.assertGreaterEqual(psutil.swap_memory().percent,
percentSwap - 10)
self.assertLessEqual(psutil.swap_memory().percent,
percentSwap + 10)
self.assertLessEqual(psutil.swap_memory().percent, 100)

# @unittest.skipIf(wmi is None, "wmi module is not installed")
Expand Down

0 comments on commit 78861c2

Please sign in to comment.