Make uuid test suite pass on this box by requesting output with LC_ALL=C.
This commit is contained in:
parent
6cea7d74ad
commit
75a832d4e7
|
@ -288,12 +288,16 @@ class TestUUID(TestCase):
|
||||||
def test_ifconfig_getnode(self):
|
def test_ifconfig_getnode(self):
|
||||||
import os
|
import os
|
||||||
if os.name == 'posix':
|
if os.name == 'posix':
|
||||||
self.check_node(uuid._ifconfig_getnode(), 'ifconfig')
|
node = uuid._ifconfig_getnode()
|
||||||
|
if node is not None:
|
||||||
|
self.check_node(node, 'ifconfig')
|
||||||
|
|
||||||
def test_ipconfig_getnode(self):
|
def test_ipconfig_getnode(self):
|
||||||
import os
|
import os
|
||||||
if os.name == 'nt':
|
if os.name == 'nt':
|
||||||
self.check_node(uuid._ipconfig_getnode(), 'ipconfig')
|
node = uuid._ipconfig_getnode()
|
||||||
|
if node is not None:
|
||||||
|
self.check_node(node, 'ipconfig')
|
||||||
|
|
||||||
def test_netbios_getnode(self):
|
def test_netbios_getnode(self):
|
||||||
if importable('win32wnet') and importable('netbios'):
|
if importable('win32wnet') and importable('netbios'):
|
||||||
|
|
|
@ -276,7 +276,10 @@ def _ifconfig_getnode():
|
||||||
import os
|
import os
|
||||||
for dir in ['', '/sbin/', '/usr/sbin']:
|
for dir in ['', '/sbin/', '/usr/sbin']:
|
||||||
try:
|
try:
|
||||||
pipe = os.popen(os.path.join(dir, 'ifconfig'))
|
# LC_ALL to get English output, 2>/dev/null to
|
||||||
|
# prevent output on stderr
|
||||||
|
cmd = 'LC_ALL=C %s 2>/dev/null' % os.path.join(dir, 'ifconfig')
|
||||||
|
pipe = os.popen(cmd)
|
||||||
except IOError:
|
except IOError:
|
||||||
continue
|
continue
|
||||||
for line in pipe:
|
for line in pipe:
|
||||||
|
|
Loading…
Reference in New Issue