[Python-checkins] cpython (merge 3.3 -> default): Issue #19804: The test_find_mac test in test_uuid is now skipped if the
serhiy.storchaka
python-checkins at python.org
Fri Jan 10 14:11:41 CET 2014
http://hg.python.org/cpython/rev/51dc9b2a5b35
changeset: 88393:51dc9b2a5b35
parent: 88390:93bf227664d6
parent: 88392:201077b57fe0
user: Serhiy Storchaka <storchaka at gmail.com>
date: Fri Jan 10 15:08:07 2014 +0200
summary:
Issue #19804: The test_find_mac test in test_uuid is now skipped if the
ifconfig executable is not available.
files:
Lib/test/test_uuid.py | 6 ++++++
Misc/NEWS | 3 +++
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -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 --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -389,6 +389,9 @@
Tests
-----
+- Issue #19804: The test_find_mac test in test_uuid is now skipped if the
+ ifconfig executable is not available.
+
- Issue #20055: Fix test_shutil under Windows with symlink privileges held.
Patch by Vajrasky Kok.
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list