diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2014-01-10 13:06:59 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2014-01-10 13:06:59 (GMT) |
commit | cce440fab84dc4a3beec755894ac2daa57e173ec (patch) | |
tree | d6de1fd5f94a2b91241cff2f0692524c9fef56c0 | |
parent | 4847e4e1f47bae9ed1855801c70ce7fbdecfa32a (diff) | |
download | cpython-cce440fab84dc4a3beec755894ac2daa57e173ec.zip cpython-cce440fab84dc4a3beec755894ac2daa57e173ec.tar.gz cpython-cce440fab84dc4a3beec755894ac2daa57e173ec.tar.bz2 |
Issue #19804: The test_find_mac test in test_uuid is now skipped if the
ifconfig executable is not available.
-rw-r--r-- | Lib/test/test_uuid.py | 6 | ||||
-rw-r--r-- | Misc/NEWS | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py index 072734e..7264808 100644 --- a/Lib/test/test_uuid.py +++ b/Lib/test/test_uuid.py @@ -3,6 +3,7 @@ from test import support import builtins import io import os +import shutil import uuid def importable(name): @@ -369,6 +370,11 @@ eth0 Link encap:Ethernet HWaddr 12:34:56:78:90:ab 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', @@ -234,6 +234,9 @@ IDLE 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. |