summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-05-26 12:32:48 +0200
committerMichał Górny <mgorny@gentoo.org>2020-05-26 12:35:46 +0200
commitad8c79245d320264c800845b2a5e402d6600be20 (patch)
tree781278bd5701cac7c3f5f8efd9923d1eb39ef85b /dev-python/psutil
parentdev-python/cssselect: Port to py39 (diff)
downloadgentoo-ad8c79245d320264c800845b2a5e402d6600be20.tar.gz
gentoo-ad8c79245d320264c800845b2a5e402d6600be20.tar.bz2
gentoo-ad8c79245d320264c800845b2a5e402d6600be20.zip
dev-python/psutil: Fix one more test failure
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/psutil')
-rw-r--r--dev-python/psutil/files/psutil-5.7.0-tests.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/dev-python/psutil/files/psutil-5.7.0-tests.patch b/dev-python/psutil/files/psutil-5.7.0-tests.patch
index 2def4979faf4..9097e90535a5 100644
--- a/dev-python/psutil/files/psutil-5.7.0-tests.patch
+++ b/dev-python/psutil/files/psutil-5.7.0-tests.patch
@@ -111,3 +111,48 @@ index 3834209f..b07b5883 100755
--
2.25.1
+From 026e4b0076a352fcb1e8de71f1393ae0d50ac06d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 26 May 2020 12:28:59 +0200
+Subject: [PATCH] Sort results in test_cpu_affinity_all_combinations
+
+Fix test_cpu_affinity_all_combinations to permit any CPU order
+in results. This fixes test failure due to affinity being reported
+out of order:
+
+ ======================================================================
+ FAIL: psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations
+ ----------------------------------------------------------------------
+ Traceback (most recent call last):
+ File "/tmp/psutil/psutil/tests/test_process.py", line 940, in test_cpu_affinity_all_combinations
+ self.assertEqual(p.cpu_affinity(), combo)
+ AssertionError: Lists differ: [8, 1] != [1, 8]
+
+ First differing element 0:
+ 8
+ 1
+
+ - [8, 1]
+ + [1, 8]
+
+ ----------------------------------------------------------------------
+---
+ psutil/tests/test_process.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
+index a0b21c6e..e3394799 100755
+--- a/psutil/tests/test_process.py
++++ b/psutil/tests/test_process.py
+@@ -937,7 +937,7 @@ class TestProcess(PsutilTestCase):
+
+ for combo in combos:
+ p.cpu_affinity(combo)
+- self.assertEqual(p.cpu_affinity(), combo)
++ self.assertEqual(sorted(p.cpu_affinity()), sorted(combo))
+
+ # TODO: #595
+ @unittest.skipIf(BSD, "broken on BSD")
+--
+2.26.2
+