Skip to content

Commit

Permalink
Add tolerance to test_linux.TestSystemVirtualMemory.test_total (#1935)
Browse files Browse the repository at this point in the history
We see this test as very flaky without tolerance in Fedora and CentOS
  • Loading branch information
hroncok authored Apr 15, 2021
1 parent 93e1c46 commit ea5b2df
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion psutil/tests/test_linux.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,8 @@ def test_total(self):
# self.assertEqual(free_value, psutil_value)
vmstat_value = vmstat('total memory') * 1024
psutil_value = psutil.virtual_memory().total
self.assertAlmostEqual(vmstat_value, psutil_value)
self.assertAlmostEqual(
vmstat_value, psutil_value, delta=TOLERANCE_SYS_MEM)

@retry_on_failure()
def test_used(self):
Expand Down

0 comments on commit ea5b2df

Please sign in to comment.