summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_uuid.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-11-07 10:23:30 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-11-07 10:23:30 (GMT)
commit57b967791a552656f4c21a4af283788269d06d83 (patch)
tree5beacad006e57361a7dd1131283d28aec3c07a8f /Lib/test/test_uuid.py
parent7c28999cb2d46da5b688ae1a9fb4e63666628541 (diff)
parente66bb9692977c66ffcbe9af64642ab5977879a9a (diff)
downloadcpython-57b967791a552656f4c21a4af283788269d06d83.zip
cpython-57b967791a552656f4c21a4af283788269d06d83.tar.gz
cpython-57b967791a552656f4c21a4af283788269d06d83.tar.bz2
Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
Based on patch by Aivars Kalvāns.
Diffstat (limited to 'Lib/test/test_uuid.py')
-rw-r--r--Lib/test/test_uuid.py20
1 files changed, 19 insertions, 1 deletions
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
index 115e66c..bfa9f97 100644
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -320,6 +320,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()
@@ -377,7 +395,7 @@ eth0 Link encap:Ethernet HWaddr 12:34:56:78:90:ab
return_value=popen):
mac = uuid._find_mac(
command='ifconfig',
- arg='',
+ args='',
hw_identifiers=[b'hwaddr'],
get_index=lambda x: x + 1,
)