File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 4
4
import sys
5
5
import unittest
6
6
import collections
7
- import contextlib
8
7
from unittest import mock
9
8
10
9
from test import support
@@ -168,12 +167,8 @@ def test_uname_processor(self):
168
167
On some systems, the processor must match the output
169
168
of 'uname -p'. See Issue 35967 for rationale.
170
169
"""
171
- with contextlib .suppress (subprocess .CalledProcessError ):
172
- expect = subprocess .check_output (['uname' , '-p' ], text = True ).strip ()
173
-
174
- if expect == 'unknown' :
175
- expect = ''
176
-
170
+ proc_res = subprocess .check_output (['uname' , '-p' ], text = True ).strip ()
171
+ expect = platform ._unknown_as_blank (proc_res )
177
172
self .assertEqual (platform .uname ().processor , expect )
178
173
179
174
@unittest .skipUnless (sys .platform .startswith ('win' ), "windows only test" )
You can’t perform that action at this time.
0 commit comments