From ef0bd1343be03df69e976ce44853a3aebcc6d81f Mon Sep 17 00:00:00 2001 From: Peter Sobot Date: Fri, 15 Oct 2021 11:39:21 -0400 Subject: [PATCH] Only run GetDebugString test with cpp impl. --- python/google/protobuf/internal/descriptor_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/google/protobuf/internal/descriptor_test.py b/python/google/protobuf/internal/descriptor_test.py index 169f4f777d..057b6b01a7 100644 --- a/python/google/protobuf/internal/descriptor_test.py +++ b/python/google/protobuf/internal/descriptor_test.py @@ -143,6 +143,10 @@ class DescriptorTest(unittest.TestCase): def testContainingServiceFixups(self): self.assertEqual(self.my_service, self.my_method.containing_service) + @unittest.skipIf( + api_implementation.Type() != 'cpp', + 'GetDebugString is only available with the cpp implementation', + ) def testGetDebugString(self): self.assertEqual(self.my_file.GetDebugString(), TEST_FILE_DESCRIPTOR_DEBUG)