[issue7650] test_uuid is invalid
Austin English
report at bugs.python.org
Thu Apr 8 18:48:28 CEST 2010
Austin English <austinenglish+python at gmail.com> added the comment:
>From Juan Lang, who originally pointed out the bug:
My only comment is that the message is now misleading:
- individual_group_bit = (node >> 40L) & 1
- universal_local_bit = (node >> 40L) & 2
message = "%012x doesn't look like a real MAC address" % node
- self.assertEqual(individual_group_bit, 0, message)
- self.assertEqual(universal_local_bit, 0, message)
self.assertNotEqual(node, 0, message)
self.assertNotEqual(node, 0xffffffffffffL, message)
The test no longer checks for the uuid being a MAC address or not.
Ideally it would be reworded to be less confusing, or perhaps the code
could check the various "flavors" of uuids, and check that a generated
uuid conforms to one of them.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7650>
_______________________________________
More information about the Python-bugs-list
mailing list