@@ -154,11 +154,26 @@ def test_uname(self):
154154 res = platform .uname ()
155155 self .assertTrue (any (res ))
156156 self .assertEqual (res [0 ], res .system )
157+ self .assertEqual (res [- 6 ], res .system )
157158 self .assertEqual (res [1 ], res .node )
159+ self .assertEqual (res [- 5 ], res .node )
158160 self .assertEqual (res [2 ], res .release )
161+ self .assertEqual (res [- 4 ], res .release )
159162 self .assertEqual (res [3 ], res .version )
163+ self .assertEqual (res [- 3 ], res .version )
160164 self .assertEqual (res [4 ], res .machine )
165+ self .assertEqual (res [- 2 ], res .machine )
161166 self .assertEqual (res [5 ], res .processor )
167+ self .assertEqual (res [- 1 ], res .processor )
168+ self .assertEqual (len (res ), 6 )
169+
170+ def test_uname_cast_to_tuple (self ):
171+ res = platform .uname ()
172+ expected = (
173+ res .system , res .node , res .release , res .version , res .machine ,
174+ res .processor ,
175+ )
176+ self .assertEqual (tuple (res ), expected )
162177
163178 @unittest .skipIf (sys .platform in ['win32' , 'OpenVMS' ], "uname -p not used" )
164179 def test_uname_processor (self ):
0 commit comments