ifconfig executable is not available.
import builtins
import io
import os
+import shutil
import uuid
def importable(name):
def mock_popen(cmd):
return io.StringIO(data)
+ if shutil.which('ifconfig') is None:
+ path = os.pathsep.join(('/sbin', '/usr/sbin'))
+ if shutil.which('ifconfig', path=path) is None:
+ self.skipTest('requires ifconfig')
+
with support.swap_attr(os, 'popen', mock_popen):
mac = uuid._find_mac(
command='ifconfig',
Tests
-----
+- Issue #19804: The test_find_mac test in test_uuid is now skipped if the
+ ifconfig executable is not available.
+
- Issue #19886: Use better estimated memory requirements for bigmem tests.
- Issue #20055: Fix test_shutil under Windows with symlink privileges held.