mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
Issue #17293: uuid.getnode() now determines MAC address on AIX using netstat.
Based on patch by Aivars Kalvāns.
This commit is contained in:
parent
8e92f57274
commit
e66bb96929
3 changed files with 71 additions and 19 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue