summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_uuid.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2006-07-28 04:51:59 (GMT)
committerTim Peters <tim.peters@gmail.com>2006-07-28 04:51:59 (GMT)
commit750c4420a86852bf549ded572c52b544b7c4bc6b (patch)
tree05217d3f2b5a0c54a73027d755a910d8f6cd6cf9 /Lib/test/test_uuid.py
parentdf80af7659c05e45bb3500ce4cecca1f3f426280 (diff)
downloadcpython-750c4420a86852bf549ded572c52b544b7c4bc6b.zip
cpython-750c4420a86852bf549ded572c52b544b7c4bc6b.tar.gz
cpython-750c4420a86852bf549ded572c52b544b7c4bc6b.tar.bz2
Live with that "the hardware address" is an ill-defined
concept, and that different ways of trying to find "the hardware address" may return different results. Certainly true on both of my Windows boxes, and in different ways (see whining on python-dev).
Diffstat (limited to 'Lib/test/test_uuid.py')
-rw-r--r--Lib/test/test_uuid.py16
1 files changed, 12 insertions, 4 deletions
diff --git a/Lib/test/test_uuid.py b/Lib/test/test_uuid.py
index 3842bb9..36266e1 100644
--- a/Lib/test/test_uuid.py
+++ b/Lib/test/test_uuid.py
@@ -284,7 +284,11 @@ class TestUUID(TestCase):
msg = "different sources disagree on node:\n"
for s, n in TestUUID.source2node.iteritems():
msg += " from source %r, node was %012x\n" % (s, n)
- self.fail(msg)
+ # There's actually no reason to expect the MAC addresses
+ # to agree across various methods -- e.g., a box may have
+ # multiple network interfaces, and different ways of getting
+ # a MAC address may favor different HW.
+ ##self.fail(msg)
else:
TestUUID.last_node = node
@@ -309,7 +313,7 @@ class TestUUID(TestCase):
def test_random_getnode(self):
node = uuid._random_getnode()
self.assert_(0 <= node)
- self.assert_(node < 1<<48L)
+ self.assert_(node < (1L <<48))
def test_unixdll_getnode(self):
import os
@@ -322,10 +326,14 @@ class TestUUID(TestCase):
self.check_node(uuid._windll_getnode(), 'windll')
def test_getnode(self):
- self.check_node(uuid.getnode(), "getnode1")
+ node1 = uuid.getnode()
+ self.check_node(node1, "getnode1")
# Test it again to ensure consistency.
- self.check_node(uuid.getnode(), "getnode2")
+ node2 = uuid.getnode()
+ self.check_node(node2, "getnode2")
+
+ self.assertEqual(node1, node2)
def test_uuid1(self):
equal = self.assertEqual