changeset: 88392:201077b57fe0 branch: 3.3 parent: 88388:2ca26065fb00 user: Serhiy Storchaka date: Fri Jan 10 15:06:59 2014 +0200 files: Lib/test/test_uuid.py Misc/NEWS description: Issue #19804: The test_find_mac test in test_uuid is now skipped if the ifconfig executable is not available. diff -r 2ca26065fb00 -r 201077b57fe0 Lib/test/test_uuid.py --- a/Lib/test/test_uuid.py Fri Jan 10 13:37:54 2014 +0200 +++ b/Lib/test/test_uuid.py Fri Jan 10 15:06:59 2014 +0200 @@ -3,6 +3,7 @@ import builtins import io import os +import shutil import uuid def importable(name): @@ -369,6 +370,11 @@ 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', diff -r 2ca26065fb00 -r 201077b57fe0 Misc/NEWS --- a/Misc/NEWS Fri Jan 10 13:37:54 2014 +0200 +++ b/Misc/NEWS Fri Jan 10 15:06:59 2014 +0200 @@ -234,6 +234,9 @@ 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.