Skip to content
Merged
Changes from 5 commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions Lib/test/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
import sysconfig
import tempfile
import unittest
import collections
import contextlib
from unittest import mock

from test import support
Expand Down Expand Up @@ -189,6 +191,18 @@ def test_uname(self):
self.assertEqual(res[4], res.machine)
self.assertEqual(res[5], res.processor)

@unittest.skipIf(sys.platform in ['win32', 'OpenVMS'], "uname -p not used")
def test_uname_processor(self):
"""
On some systems, the processor must match the output
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(),
)

@unittest.skipUnless(sys.platform.startswith('win'), "windows only test")
def test_uname_win32_ARCHITEW6432(self):
# Issue 7860: make sure we get architecture from the correct variable
Expand Down