Add patch to add delta for cpu tests.
This commit is contained in:
parent
5dc2a1dbcc
commit
675494cbda
12
python-psutil-add-delta-to-cputest.patch
Normal file
12
python-psutil-add-delta-to-cputest.patch
Normal 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:
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 5.8.0
|
Version: 5.8.0
|
||||||
Release: 9%{?dist}
|
Release: 10%{?dist}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
|
||||||
License: BSD
|
License: BSD
|
||||||
@ -16,6 +16,7 @@ Patch0: python-psutil-skip-tests-in-mock.patch
|
|||||||
|
|
||||||
# Add tolerance to psutil.tests.test_linux.TestSystemVirtualMemory.test_total
|
# Add tolerance to psutil.tests.test_linux.TestSystemVirtualMemory.test_total
|
||||||
Patch1: https://github.com/giampaolo/psutil/pull/1935.patch#/python-psutil-add-tolerance.patch
|
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: gcc
|
||||||
BuildRequires: grep
|
BuildRequires: grep
|
||||||
@ -124,6 +125,9 @@ test -f %{buildroot}%{python2_egg_path}
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%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
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.8.0-9
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user