[Python-checkins] r79905 - python/branches/py3k-cdecimal/Lib/test/test_uuid.py

stefan.krah python-checkins at python.org
Thu Apr 8 13:43:36 CEST 2010


Author: stefan.krah
Date: Thu Apr  8 13:43:36 2010
New Revision: 79905

Log:
Check proposed fix for issues #1481, #3581 on the buildbots. Will revert.



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	Thu Apr  8 13:43:36 2010
@@ -292,11 +292,7 @@
         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)
@@ -318,10 +314,6 @@
 
     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()
@@ -346,13 +338,12 @@
 
     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':
-            self.check_node(uuid._unixdll_getnode(), 'unixdll')
+            try:
+                self.check_node(uuid._unixdll_getnode(), 'unixdll')
+            except TypeError: # _uuid_generate_time is None
+                pass
 
     def test_windll_getnode(self):
         import os
@@ -361,10 +352,6 @@
 
     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