Add patch to add delta for cpu tests.

This commit is contained in:
Kevin Fenzi 2021-08-07 12:56:39 -07:00
parent 5dc2a1dbcc
commit 675494cbda
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_system.py psutil-release-5.8.0/psutil/tests/test_system.py
--- psutil-release-5.8.0.orig/psutil/tests/test_system.py 2021-08-07 12:29:17.466043213 -0700
+++ psutil-release-5.8.0/psutil/tests/test_system.py 2021-08-07 12:27:52.273801318 -0700
@@ -433,7 +433,7 @@
summed_values = base._make([sum(num) for num in zip(*per_cpu)])
for field in base._fields:
self.assertAlmostEqual(
- getattr(base, field), getattr(summed_values, field), delta=1)
+ getattr(base, field), getattr(summed_values, field), delta=2)
def _test_cpu_percent(self, percent, last_ret, new_ret):
try:

View File

@ -3,7 +3,7 @@
Name: python-%{srcname}
Version: 5.8.0
Release: 9%{?dist}
Release: 10%{?dist}
Summary: %{sum}
License: BSD
@ -16,6 +16,7 @@ Patch0: python-psutil-skip-tests-in-mock.patch
# Add tolerance to psutil.tests.test_linux.TestSystemVirtualMemory.test_total
Patch1: https://github.com/giampaolo/psutil/pull/1935.patch#/python-psutil-add-tolerance.patch
Patch2: python-psutil-add-delta-to-cputest.patch
BuildRequires: gcc
BuildRequires: grep
@ -124,6 +125,9 @@ test -f %{buildroot}%{python2_egg_path}
%changelog
* Sat Aug 07 2021 Kevin Fenzi <kevin@scrye.com> - 5.8.0-10
- Add patch to add delta for cpu tests.
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.8.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild