diff options
author | Larry Hastings <larry@hastings.org> | 2012-06-24 21:30:41 (GMT) |
---|---|---|
committer | Larry Hastings <larry@hastings.org> | 2012-06-24 21:30:41 (GMT) |
commit | 68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6 (patch) | |
tree | 051c2a77f319435a45f398049806b6fd2e09408b /Lib/test/test_platform.py | |
parent | 56ed2844fa88882a91f9ccf670c0e7a9736eb2a2 (diff) | |
download | cpython-68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6.zip cpython-68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6.tar.gz cpython-68386bc0b88eb4b7c9aeb4f753114dc85f8df5b6.tar.bz2 |
Issue #15164: Change return value of platform.uname() from a
plain tuple to a collections.namedtuple.
Diffstat (limited to 'Lib/test/test_platform.py')
-rw-r--r-- | Lib/test/test_platform.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py index cfe623a..6abf443 100644 --- a/Lib/test/test_platform.py +++ b/Lib/test/test_platform.py @@ -133,6 +133,12 @@ class PlatformTest(unittest.TestCase): def test_uname(self): res = platform.uname() self.assertTrue(any(res)) + self.assertEqual(res[0], res.system) + self.assertEqual(res[1], res.node) + self.assertEqual(res[2], res.release) + self.assertEqual(res[3], res.version) + self.assertEqual(res[4], res.machine) + self.assertEqual(res[5], res.processor) @unittest.skipUnless(sys.platform.startswith('win'), "windows only test") def test_uname_win32_ARCHITEW6432(self): @@ -166,7 +172,7 @@ class PlatformTest(unittest.TestCase): def test_mac_ver(self): res = platform.mac_ver() - if platform.uname()[0] == 'Darwin': + if platform.uname().system == 'Darwin': # We're on a MacOSX system, check that # the right version information is returned fd = os.popen('sw_vers', 'r') |