Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.

Based on patch by Aivars Kalvāns.
This commit is contained in:
Serhiy Storchaka 2014-11-07 12:19:40 +02:00
parent 8e92f57274
commit e66bb96929
3 changed files with 71 additions and 19 deletions

View file

@ -319,6 +319,24 @@ class TestUUID(unittest.TestCase):
if node is not None:
self.check_node(node, 'ifconfig')
@unittest.skipUnless(os.name == 'posix', 'requires Posix')
def test_arp_getnode(self):
node = uuid._arp_getnode()
if node is not None:
self.check_node(node, 'arp')
@unittest.skipUnless(os.name == 'posix', 'requires Posix')
def test_lanscan_getnode(self):
node = uuid._lanscan_getnode()
if node is not None:
self.check_node(node, 'lanscan')
@unittest.skipUnless(os.name == 'posix', 'requires Posix')
def test_netstat_getnode(self):
node = uuid._netstat_getnode()
if node is not None:
self.check_node(node, 'netstat')
@unittest.skipUnless(os.name == 'nt', 'requires Windows')
def test_ipconfig_getnode(self):
node = uuid._ipconfig_getnode()