c1fe33
From 4ffbcb458ff0b838f2bfe387b6305c4817e363ae Mon Sep 17 00:00:00 2001
c1fe33
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
c1fe33
Date: Thu, 15 Apr 2021 17:07:38 +0200
c1fe33
Subject: [PATCH] Add tolerance to
c1fe33
 test_linux.TestSystemVirtualMemory.test_total
c1fe33
c1fe33
We see this test as very flaky without tolerance in Fedora and CentOS
c1fe33
---
c1fe33
 psutil/tests/test_linux.py | 3 ++-
c1fe33
 1 file changed, 2 insertions(+), 1 deletion(-)
c1fe33
c1fe33
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
c1fe33
index 0c6d498c8..f5243c2cd 100755
c1fe33
--- a/psutil/tests/test_linux.py
c1fe33
+++ b/psutil/tests/test_linux.py
c1fe33
@@ -243,7 +243,8 @@ def test_total(self):
c1fe33
         # self.assertEqual(free_value, psutil_value)
c1fe33
         vmstat_value = vmstat('total memory') * 1024
c1fe33
         psutil_value = psutil.virtual_memory().total
c1fe33
-        self.assertAlmostEqual(vmstat_value, psutil_value)
c1fe33
+        self.assertAlmostEqual(
c1fe33
+            vmstat_value, psutil_value, delta=TOLERANCE_SYS_MEM)
c1fe33
 
c1fe33
     @retry_on_failure()
c1fe33
     def test_used(self):