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.
pull/2391/merge
Adam Cozzette 8 years ago
parent a41090ee6b
commit a7f300d6ff
  1. 2
      python/google/protobuf/internal/descriptor_pool_test.py

@ -269,7 +269,7 @@ class DescriptorPoolTest(unittest.TestCase):
self.pool.AddExtensionDescriptor(another_field) self.pool.AddExtensionDescriptor(another_field)
extensions = self.pool.FindAllExtensions(factory1_message) 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)) self.assertEqual(expected_extension_numbers, set(extensions))
# Verify that mutating the returned list does not affect the pool. # Verify that mutating the returned list does not affect the pool.
extensions.append('unexpected_element') extensions.append('unexpected_element')

Loading…
Cancel
Save