[Python-checkins] r79909 - python/branches/py3k-cdecimal/Lib/test/test_uuid.py
stefan.krah
python-checkins at python.org
Fri Apr 9 16:31:41 CEST 2010
Author: stefan.krah
Date: Fri Apr 9 16:31:41 2010
New Revision: 79909
Log:
Revert changes used for buildbot testing.
Modified:
python/branches/py3k-cdecimal/Lib/test/test_uuid.py
Modified: python/branches/py3k-cdecimal/Lib/test/test_uuid.py
==============================================================================
--- python/branches/py3k-cdecimal/Lib/test/test_uuid.py (original)
+++ python/branches/py3k-cdecimal/Lib/test/test_uuid.py Fri Apr 9 16:31:41 2010
@@ -292,7 +292,11 @@
badtype(lambda: setattr(u, 'node', 0))
def check_node(self, node, source):
+ individual_group_bit = (node >> 40) & 1
+ universal_local_bit = (node >> 40) & 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, 0xffffffffffff, message)
self.assertTrue(0 <= node, message)
@@ -314,6 +318,10 @@
def test_ifconfig_getnode(self):
import sys
+ print(""" WARNING: uuid._ifconfig_getnode is unreliable on many platforms.
+ It is disabled until the code and/or test can be fixed properly.""", file=sys.__stdout__)
+ return
+
import os
if os.name == 'posix':
node = uuid._ifconfig_getnode()
@@ -338,12 +346,13 @@
def test_unixdll_getnode(self):
import sys
+ print(""" WARNING: uuid._unixdll_getnode is unreliable on many platforms.
+ It is disabled until the code and/or test can be fixed properly.""", file=sys.__stdout__)
+ return
+
import os
if importable('ctypes') and os.name == 'posix':
- try:
- self.check_node(uuid._unixdll_getnode(), 'unixdll')
- except TypeError: # _uuid_generate_time is None
- pass
+ self.check_node(uuid._unixdll_getnode(), 'unixdll')
def test_windll_getnode(self):
import os
@@ -352,6 +361,10 @@
def test_getnode(self):
import sys
+ print(""" WARNING: uuid.getnode is unreliable on many platforms.
+ It is disabled until the code and/or test can be fixed properly.""", file=sys.__stdout__)
+ return
+
node1 = uuid.getnode()
self.check_node(node1, "getnode1")
More information about the Python-checkins
mailing list