diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2017-03-29 14:32:48 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2017-03-29 14:33:05 -0700 |
commit | d36c0c538a545fac5d9db6ba65c525246d4efa95 (patch) | |
tree | 3fd29af0f137dfaf5df892723e60600f674392b3 /python/google/protobuf/internal/reflection_test.py | |
parent | 4a0dd03e52e09332c8fd0f8f26a8e0ae9f911182 (diff) |
Down-integrate from google3.
Diffstat (limited to 'python/google/protobuf/internal/reflection_test.py')
-rwxr-xr-x | python/google/protobuf/internal/reflection_test.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python/google/protobuf/internal/reflection_test.py b/python/google/protobuf/internal/reflection_test.py index 0e881015..55b0d72e 100755 --- a/python/google/protobuf/internal/reflection_test.py +++ b/python/google/protobuf/internal/reflection_test.py @@ -1551,7 +1551,14 @@ class ReflectionTest(BaseTestCase): container = copy.deepcopy(proto1.repeated_int32) self.assertEqual([2, 3], container) - # TODO(anuraag): Implement deepcopy for repeated composite / extension dict + message1 = proto1.repeated_nested_message.add() + message1.bb = 1 + messages = copy.deepcopy(proto1.repeated_nested_message) + self.assertEqual(proto1.repeated_nested_message, messages) + message1.bb = 2 + self.assertNotEqual(proto1.repeated_nested_message, messages) + + # TODO(anuraag): Implement deepcopy for extension dict def testClear(self): proto = unittest_pb2.TestAllTypes() |