Skip to content

Commit e72cbcb

Browse files
jaracoaeros
andauthored
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 <[email protected]> * Expect '' for 'unknown' Co-authored-by: Kyle Stanley <[email protected]>
1 parent 58d6f2e commit e72cbcb

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Lib/test/test_platform.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,12 @@ def test_uname_processor(self):
169169
of 'uname -p'. See Issue 35967 for rationale.
170170
"""
171171
with contextlib.suppress(subprocess.CalledProcessError):
172-
self.assertEqual(
173-
platform.uname().processor,
174-
subprocess.check_output(['uname', '-p'], text=True).strip(),
175-
)
172+
expect = subprocess.check_output(['uname', '-p'], text=True).strip()
173+
174+
if expect == 'unknown':
175+
expect = ''
176+
177+
self.assertEqual(platform.uname().processor, expect)
176178

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

0 commit comments

Comments
 (0)