Skip to content

Commit

Permalink
bpo-35967: Make test_platform.test_uname_processor more lenient to sa…
Browse files Browse the repository at this point in the history
…tisfy 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 <[email protected]>

* Expect '' for 'unknown'

Co-authored-by: Kyle Stanley <[email protected]>
  • Loading branch information
jaraco and aeros authored Apr 15, 2020
1 parent 58d6f2e commit e72cbcb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Lib/test/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
expect = ''

self.assertEqual(platform.uname().processor, expect)

@unittest.skipUnless(sys.platform.startswith('win'), "windows only test")
def test_uname_win32_ARCHITEW6432(self):
Expand Down

0 comments on commit e72cbcb

Please sign in to comment.