Gentoo Archives: gentoo-commits

From: "Michał Górny" <mgorny@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-python/psutil/files/
Date: Tue, 26 May 2020 10:36:01
Message-Id: 1590489346.ad8c79245d320264c800845b2a5e402d6600be20.mgorny@gentoo
1 commit: ad8c79245d320264c800845b2a5e402d6600be20
2 Author: Michał Górny <mgorny <AT> gentoo <DOT> org>
3 AuthorDate: Tue May 26 10:32:48 2020 +0000
4 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org>
5 CommitDate: Tue May 26 10:35:46 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad8c7924
7
8 dev-python/psutil: Fix one more test failure
9
10 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>
11
12 dev-python/psutil/files/psutil-5.7.0-tests.patch | 45 ++++++++++++++++++++++++
13 1 file changed, 45 insertions(+)
14
15 diff --git a/dev-python/psutil/files/psutil-5.7.0-tests.patch b/dev-python/psutil/files/psutil-5.7.0-tests.patch
16 index 2def4979faf..9097e90535a 100644
17 --- a/dev-python/psutil/files/psutil-5.7.0-tests.patch
18 +++ b/dev-python/psutil/files/psutil-5.7.0-tests.patch
19 @@ -111,3 +111,48 @@ index 3834209f..b07b5883 100755
20 --
21 2.25.1
22
23 +From 026e4b0076a352fcb1e8de71f1393ae0d50ac06d Mon Sep 17 00:00:00 2001
24 +From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@g.o>
25 +Date: Tue, 26 May 2020 12:28:59 +0200
26 +Subject: [PATCH] Sort results in test_cpu_affinity_all_combinations
27 +
28 +Fix test_cpu_affinity_all_combinations to permit any CPU order
29 +in results. This fixes test failure due to affinity being reported
30 +out of order:
31 +
32 + ======================================================================
33 + FAIL: psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations
34 + ----------------------------------------------------------------------
35 + Traceback (most recent call last):
36 + File "/tmp/psutil/psutil/tests/test_process.py", line 940, in test_cpu_affinity_all_combinations
37 + self.assertEqual(p.cpu_affinity(), combo)
38 + AssertionError: Lists differ: [8, 1] != [1, 8]
39 +
40 + First differing element 0:
41 + 8
42 + 1
43 +
44 + - [8, 1]
45 + + [1, 8]
46 +
47 + ----------------------------------------------------------------------
48 +---
49 + psutil/tests/test_process.py | 2 +-
50 + 1 file changed, 1 insertion(+), 1 deletion(-)
51 +
52 +diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
53 +index a0b21c6e..e3394799 100755
54 +--- a/psutil/tests/test_process.py
55 ++++ b/psutil/tests/test_process.py
56 +@@ -937,7 +937,7 @@ class TestProcess(PsutilTestCase):
57 +
58 + for combo in combos:
59 + p.cpu_affinity(combo)
60 +- self.assertEqual(p.cpu_affinity(), combo)
61 ++ self.assertEqual(sorted(p.cpu_affinity()), sorted(combo))
62 +
63 + # TODO: #595
64 + @unittest.skipIf(BSD, "broken on BSD")
65 +--
66 +2.26.2
67 +