Clean up stale if-guards for Python nonconformance that no longer applies.

I just tried removing a bunch of if api_implementation.Type() guards in
message_test.py, and a bunch of them just pass without specialization! The bugs
that used to cause trouble seem to be now fixed.

PiperOrigin-RevId: 711764185
pull/19838/head
Tony Liao 2 months ago committed by Copybara-Service
parent d292d8be49
commit eef246efd8
  1. 4
      python/google/protobuf/internal/message_test.py

@ -2583,10 +2583,6 @@ class Proto3Test(unittest.TestCase):
msg = map_unittest_pb2.TestMap()
msg.map_int32_all_types[2].optional_string = 'bar'
if api_implementation.Type() == 'cpp':
# Need to keep the map reference because of b/27942626.
# TODO: Remove it.
unused_map = msg.map_int32_all_types # pylint: disable=unused-variable
msg_value = msg.map_int32_all_types[2]
msg.Clear()

Loading…
Cancel
Save