Преглед на файлове

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 преди 9 години
родител
ревизия
a7f300d6ff
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  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')