summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiro HronĨok <miro@hroncok.cz>2021-04-15 17:16:26 +0200
committerGitHub <noreply@github.com>2021-04-15 17:16:26 +0200
commitea5b2df02e39816c1f6626dd9d93ae7ede422687 (patch)
treec5c6cc3726534b4a4bf93145d7c07babf7726c8a
parent93e1c468ab4ac7922472114b3aeeacda2c8676a1 (diff)
downloadpsutil-ea5b2df02e39816c1f6626dd9d93ae7ede422687.tar.gz
Add tolerance to test_linux.TestSystemVirtualMemory.test_total (#1935)
We see this test as very flaky without tolerance in Fedora and CentOS
-rwxr-xr-xpsutil/tests/test_linux.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 0c6d498c..f5243c2c 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -243,7 +243,8 @@ class TestSystemVirtualMemory(PsutilTestCase):
# 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):