Explorar el Código

Fixed descriptor_pool_test.py for Python 2.6

The curly brace syntax for sets was introduced in Python 2.7, and so for
compatibility with 2.6 we need to avoid using it for now.
Adam Cozzette hace 9 años
padre
commit
a7f300d6ff
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      python/google/protobuf/internal/descriptor_pool_test.py

+ 1 - 1
python/google/protobuf/internal/descriptor_pool_test.py

@@ -269,7 +269,7 @@ class DescriptorPoolTest(unittest.TestCase):
     self.pool.AddExtensionDescriptor(another_field)
 
     extensions = self.pool.FindAllExtensions(factory1_message)
-    expected_extension_numbers = {one_more_field, another_field}
+    expected_extension_numbers = set([one_more_field, another_field])
     self.assertEqual(expected_extension_numbers, set(extensions))
     # Verify that mutating the returned list does not affect the pool.
     extensions.append('unexpected_element')