From ffe993c14ab58880cd50056386b3efcd40b1bb73 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Apr 2020 15:04:43 -0400 Subject: [PATCH 1/3] bpo-35967: Make test more lenient to satisfy build bots. --- Lib/test/test_platform.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 0e6cb6db1ee988..44cea04d3b03db 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -169,10 +169,12 @@ def test_uname_processor(self): of 'uname -p'. See Issue 35967 for rationale. """ with contextlib.suppress(subprocess.CalledProcessError): - self.assertEqual( - platform.uname().processor, - subprocess.check_output(['uname', '-p'], text=True).strip(), - ) + expect = subprocess.check_output(['uname', '-p'], text=True).strip() + + if expect == 'unknown': + return + + self.assertEqual(expect, platform.uname().processor) @unittest.skipUnless(sys.platform.startswith('win'), "windows only test") def test_uname_win32_ARCHITEW6432(self): From 0d9e4d12ba7dab057894dd697e496d0566aec510 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Apr 2020 16:29:53 -0400 Subject: [PATCH 2/3] Update Lib/test/test_platform.py Co-Authored-By: Kyle Stanley --- Lib/test/test_platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 44cea04d3b03db..307d06f7403774 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -174,7 +174,7 @@ def test_uname_processor(self): if expect == 'unknown': return - self.assertEqual(expect, platform.uname().processor) + self.assertEqual(platform.uname().processor, expect) @unittest.skipUnless(sys.platform.startswith('win'), "windows only test") def test_uname_win32_ARCHITEW6432(self): From d1fe7ee01106c846ba432c722abe4cb17c642402 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Wed, 15 Apr 2020 16:32:29 -0400 Subject: [PATCH 3/3] Expect '' for 'unknown' --- Lib/test/test_platform.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 307d06f7403774..63215a06358b61 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -172,7 +172,7 @@ def test_uname_processor(self): expect = subprocess.check_output(['uname', '-p'], text=True).strip() if expect == 'unknown': - return + expect = '' self.assertEqual(platform.uname().processor, expect)