Commit d06adbd4 authored by Dan O'Reilly's avatar Dan O'Reilly

Fix usage of assertItemsEqual on Py3

Signed-off-by: 's avatarDan O'Reilly <oreilldf@gmail.com>
parent 3d5aa6ae
...@@ -291,9 +291,9 @@ class GeneratorTest(unittest.TestCase): ...@@ -291,9 +291,9 @@ class GeneratorTest(unittest.TestCase):
self.assertIs(desc.oneofs[0], desc.oneofs_by_name['oneof_field']) self.assertIs(desc.oneofs[0], desc.oneofs_by_name['oneof_field'])
nested_names = set(['oneof_uint32', 'oneof_nested_message', nested_names = set(['oneof_uint32', 'oneof_nested_message',
'oneof_string', 'oneof_bytes']) 'oneof_string', 'oneof_bytes'])
self.assertItemsEqual( self.assertEqual(
nested_names, 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(): for field_name, field_desc in desc.fields_by_name.items():
if field_name in nested_names: if field_name in nested_names:
self.assertIs(desc.oneofs[0], field_desc.containing_oneof) self.assertIs(desc.oneofs[0], field_desc.containing_oneof)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment