]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-35967: Make test_platform.test_uname_processor more lenient to satisfy build...
authorJason R. Coombs <jaraco@jaraco.com>
Wed, 15 Apr 2020 23:55:35 +0000 (19:55 -0400)
committerGitHub <noreply@github.com>
Wed, 15 Apr 2020 23:55:35 +0000 (19:55 -0400)
* bpo-35967: Make test more lenient to satisfy build bots.

* Update Lib/test/test_platform.py

Co-Authored-By: Kyle Stanley <aeros167@gmail.com>
* Expect '' for 'unknown'

Co-authored-by: Kyle Stanley <aeros167@gmail.com>
Lib/test/test_platform.py

index 0e6cb6db1ee988cdfe01ea5ff66c433dc59eafbc..63215a06358b618f527693e9e2a12d383c018951 100644 (file)
@@ -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):