Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Add a test intended to capture the expected values from 'uname -p'
  • Loading branch information
jaraco committed Apr 14, 2019
commit 9aacda974a322d76de9139f86eced861fca7bde0
8 changes: 8 additions & 0 deletions Lib/test/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import sysconfig
import tempfile
import unittest
import collections
from unittest import mock

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

def test_uname_processor(self):
expected = collections.defaultdict(
set,
Darwin={'i386'},
)[platform.system()]
self.assertIn(platform.uname().processor, expected)

@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