diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-04-15 23:55:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-15 23:55:35 (GMT) |
commit | e72cbcb346cfcc1ed7741ed6baf1929764e1ee74 (patch) | |
tree | 7beea0a2d921ce8c4b90c507971fdaad92e76c05 | |
parent | 58d6f2ee3aeb699156d4784acccd2910d27982e7 (diff) | |
download | cpython-e72cbcb346cfcc1ed7741ed6baf1929764e1ee74.zip cpython-e72cbcb346cfcc1ed7741ed6baf1929764e1ee74.tar.gz cpython-e72cbcb346cfcc1ed7741ed6baf1929764e1ee74.tar.bz2 |
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 <aeros167@gmail.com>
* Expect '' for 'unknown'
Co-authored-by: Kyle Stanley <aeros167@gmail.com>
-rw-r--r-- | Lib/test/test_platform.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index 0e6cb6d..63215a0 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): |