Fix usage of assertItemsEqual on Py3

Signed-off-by: Dan O'Reilly <oreilldf@gmail.com>
pull/722/head
Dan O'Reilly 9 years ago
parent 3d5aa6aef9
commit d06adbd4a4
  1. 4
      python/google/protobuf/internal/generator_test.py

@ -291,9 +291,9 @@ class GeneratorTest(unittest.TestCase):
self.assertIs(desc.oneofs[0], desc.oneofs_by_name['oneof_field'])
nested_names = set(['oneof_uint32', 'oneof_nested_message',
'oneof_string', 'oneof_bytes'])
self.assertItemsEqual(
self.assertEqual(
nested_names,
[field.name for field in desc.oneofs[0].fields])
set([field.name for field in desc.oneofs[0].fields]))
for field_name, field_desc in desc.fields_by_name.items():
if field_name in nested_names:
self.assertIs(desc.oneofs[0], field_desc.containing_oneof)

Loading…
Cancel
Save