From: Jason R. Coombs Date: Wed, 15 Apr 2020 23:55:35 +0000 (-0400) Subject: bpo-35967: Make test_platform.test_uname_processor more lenient to satisfy build... X-Git-Tag: v3.9.0a6~98 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e72cbcb346cfcc1ed7741ed6baf1929764e1ee74;p=thirdparty%2FPython%2Fcpython.git bpo-35967: Make test_platform.test_uname_processor more lenient to satisfy build bots. (GH-19544) * bpo-35967: Make test more lenient to satisfy build bots. * Update Lib/test/test_platform.py Co-Authored-By: Kyle Stanley * Expect '' for 'unknown' Co-authored-by: Kyle Stanley --- diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 0e6cb6db1ee9..63215a06358b 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -169,10 +169,12 @@ class PlatformTest(unittest.TestCase): 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': + expect = '' + + self.assertEqual(platform.uname().processor, expect) @unittest.skipUnless(sys.platform.startswith('win'), "windows only test") def test_uname_win32_ARCHITEW6432(self):